kubernetes/vendor/sigs.k8s.io/structured-merge-diff/v4/value/allocator.go

type Allocator

var HeapAllocator

type heapAllocator

func (p *heapAllocator) allocValueUnstructured() *valueUnstructured {}

func (p *heapAllocator) allocListUnstructuredRange() *listUnstructuredRange {}

func (p *heapAllocator) allocValueReflect() *valueReflect {}

func (p *heapAllocator) allocStructReflect() *structReflect {}

func (p *heapAllocator) allocMapReflect() *mapReflect {}

func (p *heapAllocator) allocListReflect() *listReflect {}

func (p *heapAllocator) allocListReflectRange() *listReflectRange {}

func (p *heapAllocator) Free(_ interface{}

// NewFreelistAllocator creates freelist based allocator.
// This allocator provides fast allocation and freeing of short lived value objects.
//
// The freelists are bounded in size by freelistMaxSize. If more than this amount of value objects is
// allocated at once, the excess will be returned to the heap for garbage collection when freed.
//
// This allocator is unsafe and must not be accessed concurrently by goroutines.
//
// This allocator works well for traversal of value data trees. Typical usage is to acquire
// a freelist at the beginning of the traversal and use it through out
// for all temporary value access.
func NewFreelistAllocator() Allocator {}

const freelistMaxSize

type freelistAllocator

type freelist

func (f *freelist) allocate() interface{}

func (f *freelist) free(v interface{}

func (w *freelistAllocator) Free(value interface{}

func (w *freelistAllocator) allocValueUnstructured() *valueUnstructured {}

func (w *freelistAllocator) allocListUnstructuredRange() *listUnstructuredRange {}

func (w *freelistAllocator) allocValueReflect() *valueReflect {}

func (w *freelistAllocator) allocStructReflect() *structReflect {}

func (w *freelistAllocator) allocMapReflect() *mapReflect {}

func (w *freelistAllocator) allocListReflect() *listReflect {}

func (w *freelistAllocator) allocListReflectRange() *listReflectRange {}