Versions in this module Expand all Collapse all v1 v1.0.2 May 16, 2024 v1.0.1 Jun 24, 2023 Changes in this version + var DefaultMemPool = New(1024, 1024 * 1024 * 1024) + func Append(buf []byte, more ...byte) []byte + func AppendString(buf []byte, more string) []byte + func Free(buf []byte) + func Init(bufSize, freeSize int) + func Malloc(size int) []byte + func Realloc(buf []byte, size int) []byte + type Allocator interface + Append func(buf []byte, more ...byte) []byte + AppendString func(buf []byte, more string) []byte + Free func(buf []byte) + Malloc func(size int) []byte + Realloc func(buf []byte, size int) []byte + func New(bufSize, freeSize int) Allocator + type MemPool struct + func (mp *MemPool) Append(buf []byte, more ...byte) []byte + func (mp *MemPool) AppendString(buf []byte, more string) []byte + func (mp *MemPool) Free(buf []byte) + func (mp *MemPool) Malloc(size int) []byte + func (mp *MemPool) Realloc(buf []byte, size int) []byte + type NativeAllocator struct + func (a *NativeAllocator) Free(buf []byte) + func (a *NativeAllocator) Malloc(size int) []byte + func (a *NativeAllocator) Realloc(buf []byte, size int) []byte