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

Method Get

internal/leakcheck/leakcheck.go:151–158  ·  view source on GitHub ↗
(length int)

Source from the content-addressed store, hash-verified

149}
150
151func (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
160func (p *trackingBufferPool) Put(buf *[]byte) {
161 p.lock.Lock()

Callers

nothing calls this directly

Calls 4

currentStackFunction · 0.85
GetMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected