Documentation
¶
Overview ¶
Package fastbuffer implements the allocation and release for [][]byte to reduce memory allocation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FastBuffer ¶
FastBuffer holds the [][]byte with sync.Mutex to reduce memory allocation.
func (*FastBuffer) Allocate ¶
func (fb *FastBuffer) Allocate(size int) []byte
Allocate allocates the size of []byte from FastBuffer.
func (*FastBuffer) BatchRelease ¶
func (fb *FastBuffer) BatchRelease(d [][]byte)
BatchRelease releases the [][]byte to FastBuffer.
func (*FastBuffer) Release ¶
func (fb *FastBuffer) Release(d []byte)
Release releases the []byte to FastBuffer.
Click to show internal directories.
Click to hide internal directories.