(length int)
| 149 | } |
| 150 | |
| 151 | func (p *trackingBufferPool) Get(length int) *[]byte { |
| 152 | p.lock.Lock() |
| 153 | defer p.lock.Unlock() |
| 154 | p.bufferCount++ |
| 155 | buf := p.pool.Get(length) |
| 156 | p.allocatedBuffers[buf] = currentStack(2) |
| 157 | return buf |
| 158 | } |
| 159 | |
| 160 | func (p *trackingBufferPool) Put(buf *[]byte) { |
| 161 | p.lock.Lock() |
nothing calls this directly
no test coverage detected