MCPcopy
hub / github.com/syncthing/syncthing / newBufferPool

Function newBufferPool

lib/protocol/bufferpool.go:26–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

initFunction · 0.85
TestStressBufferPoolFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestStressBufferPoolFunction · 0.68