MCPcopy
hub / github.com/grpc/grpc-go / Put

Method Put

internal/leakcheck/leakcheck.go:160–170  ·  view source on GitHub ↗
(buf *[]byte)

Source from the content-addressed store, hash-verified

158}
159
160func (p *trackingBufferPool) Put(buf *[]byte) {
161 p.lock.Lock()
162 defer p.lock.Unlock()
163
164 if _, ok := p.allocatedBuffers[buf]; !ok {
165 p.logger.Errorf("Unknown buffer freed:\n%s", string(debug.Stack()))
166 } else {
167 delete(p.allocatedBuffers, buf)
168 }
169 p.pool.Put(buf)
170}
171
172var goroutinesToIgnore = []string{
173 "testing.Main(",

Callers

nothing calls this directly

Calls 4

ErrorfMethod · 0.65
PutMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected