MCPcopy Index your code
hub / github.com/pquerna/ffjson / init

Function init

fflib/v1/buffer_pool.go:16–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14var pool64 *sync.Pool
15
16func init() {
17 var i uint
18 // TODO(pquerna): add science here around actual pool sizes.
19 for i = 6; i < 20; i++ {
20 n := 1 << i
21 pools[poolNum(n)].New = func() interface{} { return make([]byte, 0, n) }
22 }
23 pool64 = &pools[0]
24}
25
26// This returns the pool number that will give a buffer of
27// at least 'i' bytes.

Callers

nothing calls this directly

Calls 1

poolNumFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…