kubernetes/vendor/google.golang.org/grpc/shared_buffer_pool.go

type SharedBufferPool

// NewSharedBufferPool creates a simple SharedBufferPool with buckets
// of different sizes to optimize memory usage. This prevents the pool from
// wasting large amounts of memory, even when handling messages of varying sizes.
//
// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
func NewSharedBufferPool() SharedBufferPool {}

type simpleSharedBufferPool

func (p *simpleSharedBufferPool) Get(size int) []byte {}

func (p *simpleSharedBufferPool) Put(bs *[]byte) {}

func (p *simpleSharedBufferPool) poolIdx(size int) int {}

const level0PoolMaxSize

const level1PoolMaxSize

const level2PoolMaxSize

const level3PoolMaxSize

const level4PoolMaxSize

const level0PoolIdx

const level1PoolIdx

const level2PoolIdx

const level3PoolIdx

const level4PoolIdx

const levelMaxPoolIdx

const poolArraySize

type simpleSharedBufferChildPool

type bufferPool

func (p *bufferPool) Get(size int) []byte {}

func newBytesPool(size int) simpleSharedBufferChildPool {}

type nopBufferPool

func (nopBufferPool) Get(length int) []byte {}

func (nopBufferPool) Put(*[]byte) {}