package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Functions

NewLimiter creates a new Limiter with the given limit.
NewPool creates a new pool.
WithAllocator specifies the allocator used by pool to allocate and free memory.
WithBlockNum configures how many blocks cached by this pool.
WithBlockSize configures the size of each block.
WithBufferMemoryLimit approximately limits the maximum memory size of this Buffer.
WithPoolMemoryLimiter controls the maximum memory returned to buffer.

# Structs

Buffer represents a buffer that can allocate []byte from its memory.
Limiter will block on Acquire if the number it has acquired and not released exceeds the limit.
Pool is like `sync.Pool`, which manages memory for all bytes buffers.
SliceLocation is like a reflect.SliceHeader, but it's associated with a Buffer.

# Interfaces

Allocator is the abstract interface for allocating and freeing memory.

# Type aliases

BufferOption configures a buffer.
Option configures a pool.