Documentation ¶ Index ¶ Constants func Free(b []byte) func New(n int) []byte type Allocator func (Allocator) Alloc(n int) []byte func (Allocator) Free(b []byte) Constants ¶ View Source const ( // MaxArrayLen is a safe maximum length for slices on this architecture. MaxArrayLen = 1<<31 - 1 ) Variables ¶ This section is empty. Functions ¶ func Free ¶ func Free(b []byte) Free frees the specified slice. func New ¶ func New(n int) []byte New allocates a slice of size n. The returned slice is from manually managed memory and MUST be released by calling Free. Failure to do so will result in a memory leak. Types ¶ type Allocator ¶ type Allocator struct{} func (Allocator) Alloc ¶ func (Allocator) Alloc(n int) []byte func (Allocator) Free ¶ func (Allocator) Free(b []byte) Source Files ¶ View all Source files allocator.go manual.go Click to show internal directories. Click to hide internal directories.