buffer

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FULL                   = 0x01 // indicates that a chunk doesn't have any space left
	PointerSize            = 8
	DefaultChunkBufferSize = 1 << 20
)

Variables

View Source
var ChunkSize int

Functions

func Alloc

func Alloc[T any](b *Buffer) *T

func Free

func Free[T any](b *Buffer, v *T)

func FreeSlice

func FreeSlice[T any](b *Buffer, vs []T)

func MakeSlice

func MakeSlice[T any](b *Buffer, len, cap int) []T

Types

type Buffer

type Buffer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() *Buffer

func (*Buffer) Free

func (b *Buffer) Free()

Jump to

Keyboard shortcuts

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