package
0.0.0-20240720002214-37b2b8227b91
Repository: https://github.com/progrium/go-netstack.git
Documentation: pkg.go.dev
# Functions
IMAWorkAroundForMemFile works around IMA by immediately creating a temporary PROT_EXEC mapping, while the backing file is still small.
MemoryCgroupIDFromContext returns the memory cgroup id of the ctx, or zero if the ctx does not belong to any memory cgroup.
MemoryFileFromContext returns the MemoryFile used by ctx, or nil if no such MemoryFile exists.
MemoryFileProviderFromContext returns the MemoryFileProvider used by ctx, or nil if no such MemoryFileProvider exists.
NewMemoryFile creates a MemoryFile backed by the given file.
# Constants
AllocateAndCommit indicates that pages need to be committed, in addition to being allocated.
AllocateAndWritePopulate indicates that writable pages should ideally be populated in the page table, in addition to being allocated.
AllocateOnly indicates that pages need to only be allocated.
BottomUp allocates offsets in increasing offsets.
CtxMemoryCgroupID is the memory cgroup id which the task belongs to.
CtxMemoryFile is a Context.Value key for a MemoryFile.
CtxMemoryFileProvider is a Context.Value key for a MemoryFileProvider.
DelayedEvictionDefault has unspecified behavior.
DelayedEvictionDisabled requires that evictable allocations are evicted as soon as possible.
DelayedEvictionEnabled requests that the MemoryFile delay eviction of evictable allocations until doing so is considered necessary to avoid performance degradation due to host memory pressure, or OOM kills.
DelayedEvictionManual requires that evictable allocations are only evicted when MemoryFile.StartEvictions() is called.
TopDown allocates offsets in decreasing offsets.
# Structs
AllocOpts are options used in MemoryFile.Allocate.
A Range represents a contiguous range of T.
MemoryFile is a memmap.File whose pages may be allocated to arbitrary users.
MemoryFileOpts provides options to NewMemoryFile.
# Interfaces
An EvictableMemoryUser represents a user of MemoryFile-allocated memory that may be asked to deallocate that memory in the presence of memory pressure.
MemoryFileProvider provides the MemoryFile method.
# Type aliases
AllocationMode provides a way to inform the pgalloc API how to allocate memory and pages on the host.
DelayedEvictionType is the type of MemoryFileOpts.DelayedEviction.
Direction describes how to allocate offsets from MemoryFile.