arena

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllocOverflow = errors.New("allocation overflow")

Functions

This section is empty.

Types

type Bytes

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

Bytes defines a simple implementation of a dynamic arena allocator. This implementation is not safe for concurrent usage, therefore each concurrent unit of work must allocate its own arena instance.

func NewBytes

func NewBytes(capacity uint32, dynamic bool) *Bytes

func (*Bytes) Alloc

func (ba *Bytes) Alloc(size uint32) ([]byte, error)

func (*Bytes) Reset

func (ba *Bytes) Reset()

Jump to

Keyboard shortcuts

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