allocator

package
v0.0.0-...-e0ee87b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoAlloc = MemoryManager(nil)

Functions

func Memcpy

func Memcpy(dest, src unsafe.Pointer, n uintptr)

func Memset

func Memset(p unsafe.Pointer, ch uint8, len uintptr)

Types

type BadAlloc

type BadAlloc struct {
	Message string
}

func (BadAlloc) String

func (b BadAlloc) String() string

type Memory

type Memory interface {
	Malloc(size uintptr) *byte
	Free(ptr *byte)
}

type MemoryManager

type MemoryManager interface {
	Allocate(size uintptr) unsafe.Pointer
	DeAllocate(p unsafe.Pointer)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL