()
| 24 | } |
| 25 | |
| 26 | func newBufferPool() *bufferPool { |
| 27 | return &bufferPool{ |
| 28 | pools: make([]sync.Pool, len(BlockSizes)), |
| 29 | hits: make([]atomic.Int64, len(BlockSizes)), |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func (p *bufferPool) Get(size int) []byte { |
| 34 | // Too big, isn't pooled |
no outgoing calls