Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A ¶
type A []byte
An A provides chunk allocation of []byte, amortizing the overhead of each allocation. Because the underlying storage for the slices is shared, they should share a similar lifetime in order to avoid pinning large amounts of memory unnecessarily. The allocator itself is a []byte where cap() indicates the total amount of memory and len() is the amount already allocated. The size of the buffer to allocate from is grown exponentially when it runs out of room up to a maximum size (chunkAllocMaxSize).
Click to show internal directories.
Click to hide internal directories.