- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for copyBufPool (0.24 sec)
-
src/net/http/server.go
) const copyBufPoolSize = 32 * 1024 var copyBufPool = sync.Pool{New: func() any { return new([copyBufPoolSize]byte) }} func getCopyBuf() []byte { return copyBufPool.Get().(*[copyBufPoolSize]byte)[:] } func putCopyBuf(b []byte) { if len(b) != copyBufPoolSize { panic("trying to put back buffer of the wrong size in the copyBufPool") } copyBufPool.Put((*[copyBufPoolSize]byte)(b)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0)