Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + func Unpin(prs []PinnedRange) + type AIOContext struct + func (aio *AIOContext) CancelPendingRequest() + func (aio *AIOContext) Dead() bool + func (aio *AIOContext) Drain() + func (aio *AIOContext) FinishRequest(data any) + func (aio *AIOContext) PopRequest() (any, bool) + func (aio *AIOContext) Prepare() error + func (aio *AIOContext) WaitChannel() chan struct{} + type Dumpability int + const NotDumpable + const RootDumpable + const UserDumpable + type MLockAllOpts struct + Current bool + Future bool + Mode memmap.MLockMode + type MRemapMoveMode int + const MRemapMayMove + const MRemapMustMove + const MRemapNoMove + type MRemapOpts struct + Move MRemapMoveMode + NewAddr hostarch.Addr + type MSyncOpts struct + Invalidate bool + Sync bool + type MapsCallbackFunc func(start, end hostarch.Addr, permissions hostarch.AccessType, private string, ...) + type MemoryManager struct + func NewMemoryManager(p platform.Platform, mf *pgalloc.MemoryFile, sleepForActivation bool) *MemoryManager + func (mm *MemoryManager) Activate(ctx context.Context) error + func (mm *MemoryManager) AddressSpace() platform.AddressSpace + func (mm *MemoryManager) ArgvEnd() hostarch.Addr + func (mm *MemoryManager) ArgvStart() hostarch.Addr + func (mm *MemoryManager) Auxv() arch.Auxv + func (mm *MemoryManager) Brk(ctx context.Context, addr hostarch.Addr) (hostarch.Addr, error) + func (mm *MemoryManager) BrkSetup(ctx context.Context, addr hostarch.Addr) + func (mm *MemoryManager) CheckIORange(addr hostarch.Addr, length int64) (hostarch.AddrRange, bool) + func (mm *MemoryManager) CompareAndSwapUint32(ctx context.Context, addr hostarch.Addr, old, new uint32, opts usermem.IOOpts) (uint32, error) + func (mm *MemoryManager) CopyIn(ctx context.Context, addr hostarch.Addr, dst []byte, opts usermem.IOOpts) (int, error) + func (mm *MemoryManager) CopyInTo(ctx context.Context, ars hostarch.AddrRangeSeq, dst safemem.Writer, ...) (int64, error) + func (mm *MemoryManager) CopyOut(ctx context.Context, addr hostarch.Addr, src []byte, opts usermem.IOOpts) (int, error) + func (mm *MemoryManager) CopyOutFrom(ctx context.Context, ars hostarch.AddrRangeSeq, src safemem.Reader, ...) (int64, error) + func (mm *MemoryManager) Deactivate() + func (mm *MemoryManager) DebugString(ctx context.Context) string + func (mm *MemoryManager) DecUsers(ctx context.Context) + func (mm *MemoryManager) Decommit(addr hostarch.Addr, length uint64) error + func (mm *MemoryManager) DestroyAIOContext(ctx context.Context, id uint64) *AIOContext + func (mm *MemoryManager) DetachShm(ctx context.Context, addr hostarch.Addr) error + func (mm *MemoryManager) Dumpability() Dumpability + func (mm *MemoryManager) EnableMembarrierPrivate() + func (mm *MemoryManager) EnableMembarrierRSeq() + func (mm *MemoryManager) EnsurePMAsExist(ctx context.Context, addr hostarch.Addr, length int64, opts usermem.IOOpts) (int64, error) + func (mm *MemoryManager) EnvvEnd() hostarch.Addr + func (mm *MemoryManager) EnvvStart() hostarch.Addr + func (mm *MemoryManager) Executable() *vfs.FileDescription + func (mm *MemoryManager) FindVMAByName(ar hostarch.AddrRange, hint string) (hostarch.Addr, uint64, error) + func (mm *MemoryManager) Fork(ctx context.Context) (*MemoryManager, error) + func (mm *MemoryManager) GetSharedFutexKey(ctx context.Context, addr hostarch.Addr) (futex.Key, error) + func (mm *MemoryManager) HandleUserFault(ctx context.Context, addr hostarch.Addr, at hostarch.AccessType, ...) error + func (mm *MemoryManager) IncUsers() bool + func (mm *MemoryManager) Invalidate(ar hostarch.AddrRange, opts memmap.InvalidateOpts) + func (mm *MemoryManager) InvalidateUnsavable(ctx context.Context) error + func (mm *MemoryManager) IsMembarrierPrivateEnabled() bool + func (mm *MemoryManager) IsMembarrierRSeqEnabled() bool + func (mm *MemoryManager) LoadUint32(ctx context.Context, addr hostarch.Addr, opts usermem.IOOpts) (uint32, error) + func (mm *MemoryManager) LookupAIOContext(ctx context.Context, id uint64) (*AIOContext, bool) + func (mm *MemoryManager) MLock(ctx context.Context, addr hostarch.Addr, length uint64, mode memmap.MLockMode) error + func (mm *MemoryManager) MLockAll(ctx context.Context, opts MLockAllOpts) error + func (mm *MemoryManager) MMap(ctx context.Context, opts memmap.MMapOpts) (hostarch.Addr, error) + func (mm *MemoryManager) MProtect(addr hostarch.Addr, length uint64, realPerms hostarch.AccessType, ...) error + func (mm *MemoryManager) MRemap(ctx context.Context, oldAddr hostarch.Addr, oldSize uint64, newSize uint64, ...) (hostarch.Addr, error) + func (mm *MemoryManager) MSync(ctx context.Context, addr hostarch.Addr, length uint64, opts MSyncOpts) error + func (mm *MemoryManager) MUnmap(ctx context.Context, addr hostarch.Addr, length uint64) error + func (mm *MemoryManager) MapStack(ctx context.Context) (hostarch.AddrRange, error) + func (mm *MemoryManager) MapsCallbackFuncForBuffer(buf *bytes.Buffer) MapsCallbackFunc + func (mm *MemoryManager) MaxResidentSetSize() uint64 + func (mm *MemoryManager) NewAIOContext(ctx context.Context, events uint32) (uint64, error) + func (mm *MemoryManager) NumaPolicy(addr hostarch.Addr) (linux.NumaPolicy, uint64, error) + func (mm *MemoryManager) Pin(ctx context.Context, ar hostarch.AddrRange, at hostarch.AccessType, ...) ([]PinnedRange, error) + func (mm *MemoryManager) ReadMapsDataInto(ctx context.Context, fn MapsCallbackFunc) + func (mm *MemoryManager) ReadSmapsDataInto(ctx context.Context, buf *bytes.Buffer) + func (mm *MemoryManager) ResidentSetSize() uint64 + func (mm *MemoryManager) SetArgvEnd(a hostarch.Addr) + func (mm *MemoryManager) SetArgvStart(a hostarch.Addr) + func (mm *MemoryManager) SetAuxv(auxv arch.Auxv) + func (mm *MemoryManager) SetDontFork(addr hostarch.Addr, length uint64, dontfork bool) error + func (mm *MemoryManager) SetDumpability(d Dumpability) + func (mm *MemoryManager) SetEnvvEnd(a hostarch.Addr) + func (mm *MemoryManager) SetEnvvStart(a hostarch.Addr) + func (mm *MemoryManager) SetExecutable(ctx context.Context, fd *vfs.FileDescription) + func (mm *MemoryManager) SetMmapLayout(ac *arch.Context64, r *limits.LimitSet) (arch.MmapLayout, error) + func (mm *MemoryManager) SetNumaPolicy(addr hostarch.Addr, length uint64, policy linux.NumaPolicy, nodemask uint64) error + func (mm *MemoryManager) SetVDSOSigReturn(addr uint64) + func (mm *MemoryManager) String() string + func (mm *MemoryManager) SwapUint32(ctx context.Context, addr hostarch.Addr, new uint32, opts usermem.IOOpts) (uint32, error) + func (mm *MemoryManager) VDSOSigReturn() uint64 + func (mm *MemoryManager) VirtualDataSize() uint64 + func (mm *MemoryManager) VirtualMemorySize() uint64 + func (mm *MemoryManager) VirtualMemorySizeRange(ar hostarch.AddrRange) uint64 + func (mm *MemoryManager) ZeroOut(ctx context.Context, addr hostarch.Addr, toZero int64, opts usermem.IOOpts) (int64, error) + type PinnedRange struct + File memmap.File + Offset uint64 + Source hostarch.AddrRange + func (pr PinnedRange) FileRange() memmap.FileRange + type SpecialMappable struct + func NewSpecialMappable(name string, mf *pgalloc.MemoryFile, fr memmap.FileRange) *SpecialMappable + func (*SpecialMappable) AddMapping(context.Context, memmap.MappingSpace, hostarch.AddrRange, uint64, bool) error + func (*SpecialMappable) CopyMapping(context.Context, memmap.MappingSpace, hostarch.AddrRange, hostarch.AddrRange, ...) error + func (*SpecialMappable) RemoveMapping(context.Context, memmap.MappingSpace, hostarch.AddrRange, uint64, bool) + func (m *SpecialMappable) DecRef(ctx context.Context) + func (m *SpecialMappable) DeviceID() uint64 + func (m *SpecialMappable) FileRange() memmap.FileRange + func (m *SpecialMappable) InodeID() uint64 + func (m *SpecialMappable) InvalidateUnsavable(ctx context.Context) error + func (m *SpecialMappable) Length() uint64 + func (m *SpecialMappable) MappedName(ctx context.Context) string + func (m *SpecialMappable) Msync(ctx context.Context, mr memmap.MappableRange) error + func (m *SpecialMappable) Translate(ctx context.Context, required, optional memmap.MappableRange, ...) ([]memmap.Translation, error)