storage

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address = *byte // Must be converted to the right pointer type

type ArrHeap

type ArrHeap struct {
	// contains filtered or unexported fields
}

func NewArrHeap

func NewArrHeap(elemSize int, align uintptr) (heap *ArrHeap)

Creates a new heap for allocation of array cells, whose sizes are multiple of the same element size elemSize

func (ArrHeap) DisposeArr

func (heap ArrHeap) DisposeArr(a *Address, elemNb int)

Deallocates the cell at Address a and containing an array cell of elemNb elements by putting it in the link chained

func (*ArrHeap) NewArr

func (heap *ArrHeap) NewArr(elemNb int) (a Address)

Allocates into a a new cell for an array of elemNb elements of fixed size

func (*ArrHeap) Stats

func (heap *ArrHeap) Stats() (nb, nbElems, size int)

type RecHeap

type RecHeap struct {
	// contains filtered or unexported fields
}

Heap for cells of the same size

func NewRecHeap

func NewRecHeap(recSize int, align uintptr) (heap *RecHeap)

Creates a new heap for allocation of cells with the unique size recSize

func (*RecHeap) DisposeRec

func (heap *RecHeap) DisposeRec(a *Address)

Deallocates the cell at Address a by putting it into the link chained

func (*RecHeap) NewRec

func (heap *RecHeap) NewRec() (a Address)

Allocates into a a new cell of fixed size

func (*RecHeap) Stats

func (heap *RecHeap) Stats() (nb, size int)

Jump to

Keyboard shortcuts

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