aboutsummaryrefslogtreecommitdiff
path: root/internal/bufpool/consts.go
blob: 4c2058792bdea949710a9ae4c5686453f98df077 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package bufpool

const (
	// DefaultBufferCap is the minimum capacity a borrowed buffer will have.
	// Borrow() will allocate or retrieve a buffer with at least this capacity.
	DefaultBufferCap = 32 * 1024

	// maxPooledBuffer defines the maximum capacity of a buffer that may be
	// returned to the pool. Buffers larger than this will not be pooled to
	// avoid unbounded memory usage.
	maxPooledBuffer = 8 << 20
)