MCPcopy
hub / github.com/containerd/containerd / newbufferPool

Function newbufferPool

core/remotes/docker/fetcher.go:47–56  ·  view source on GitHub ↗
(bufCap int64)

Source from the content-addressed store, hash-verified

45}
46
47func newbufferPool(bufCap int64) *bufferPool {
48 pool := &sync.Pool{
49 New: func() any {
50 return bytes.NewBuffer(make([]byte, 0, bufCap))
51 },
52 }
53 return &bufferPool{
54 pool: pool,
55 }
56}
57
58func (p *bufferPool) Get() *bytes.Buffer {
59 buf := p.pool.Get().(*bytes.Buffer)

Callers 1

openMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…