github.com/jxskiss/gopkg/v2@v2.14.9-0.20240514120614-899f3e7952b4/perf/bbp/doc.go (about) 1 // Package bbp provides efficient byte buffer pools with 2 // anti-memory-waste protection. 3 // 4 // Byte buffers acquired from this package may be put back to the pool, 5 // but they do not need to; if they are returned, they will be recycled 6 // and reused, otherwise they will be garbage collected as usual. 7 // 8 // The methods within this package and all `Pool` instances share the same 9 // underlying sized byte slice pools. The byte buffers provided by this 10 // package has a minimum limit of 64B and a maximum limit of 32MB, 11 // byte slice with size not in the range will be allocated directly 12 // from Go runtime, and won't be recycled for reuse. 13 package bbp