Documentation
¶
Index ¶
- Variables
- func Allocate[T any](a Allocator) (*T, error)
- func AllocateSlice[T any, T2 ~int | ~uint64 | ~uint32](a Allocator, size T2) ([]T, error)
- func Free[T any](a Allocator, v *T) error
- func FreeSlice[T any](a Allocator, v []T) error
- func PageReadExecute(memory []byte) error
- func PageReadWrite(memory []byte) error
- func PageReadWriteExecute(memory []byte) error
- type AlignedAllocator
- type Allocator
- type LargePageAllocator
- type PageAllocator
Constants ¶
This section is empty.
Variables ¶
View Source
var PageNoMemoryErr = unix.ENOMEM
Functions ¶
func AllocateSlice ¶
func PageReadExecute ¶
func PageReadWrite ¶
func PageReadWriteExecute ¶
PageReadWriteExecute Insecure!
Types ¶
type AlignedAllocator ¶
type AlignedAllocator uint64
func (AlignedAllocator) AllocMemory ¶
func (a AlignedAllocator) AllocMemory(size uint64) ([]byte, error)
func (AlignedAllocator) FreeMemory ¶
func (a AlignedAllocator) FreeMemory(memory []byte) error
type Allocator ¶
type Allocator interface { AllocMemory(size uint64) ([]byte, error) FreeMemory(memory []byte) error }
func NewAlignedAllocator ¶
func NewLargePageAllocator ¶
func NewLargePageAllocator() Allocator
func NewPageAllocator ¶
func NewPageAllocator() Allocator
type LargePageAllocator ¶
type LargePageAllocator struct { }
func (LargePageAllocator) AllocMemory ¶
func (a LargePageAllocator) AllocMemory(size uint64) ([]byte, error)
func (LargePageAllocator) FreeMemory ¶
func (a LargePageAllocator) FreeMemory(memory []byte) error
type PageAllocator ¶
type PageAllocator struct { }
func (PageAllocator) AllocMemory ¶
func (a PageAllocator) AllocMemory(size uint64) ([]byte, error)
func (PageAllocator) FreeMemory ¶
func (a PageAllocator) FreeMemory(memory []byte) error
Click to show internal directories.
Click to hide internal directories.