alloc

package module
v0.0.0-...-1fc7c6f Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 11 Imported by: 0

README

alloc

Memory manager for go based on memory arenas

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debugger = debugger{}

Functions

func Append

func Append[T any](getter SliceGetter[T], elems ...T)

func Clone

func Clone[T any](getter Getter[T]) T

func CloneSlice

func CloneSlice[S ~[]E, E any](getter SliceGetter[E]) S

func GC

func GC()

GC runs a garbage collection and blocks the caller until the garbage collection is complete. It may also block the entire program.

Types

type AllocStats

type AllocStats struct {
	// LastCC - Unix timestamp
	LastCC          int64 // CC - Cycle Collection
	NumCC           uint64
	ArenasAllocated uint64
	ArenasFreed     int64
}

type Getter

type Getter[T any] interface {
	Get() *T
}

func New

func New[T any]() Getter[T]

type SliceGetter

type SliceGetter[T any] interface {
	Get() []T
}

func MakeSlice

func MakeSlice[T any](len, cap int) SliceGetter[T]

Directories

Path Synopsis
benchmarks
countingSort command
levenshtein command
mergeSort command
pipeline command
winograd command
examples
alloc command
stdlib command
internal

Jump to

Keyboard shortcuts

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