- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for drop (0.18 sec)
-
internal/handlers/forwarder.go
} type bufPool struct { sz int pool sync.Pool } func (b *bufPool) Put(buf []byte) { if cap(buf) < b.sz || cap(buf) > b.sz*2 { // Buffer too small or will likely leak memory after being expanded. // Drop it. return } b.pool.Put(&buf) } func (b *bufPool) Get() []byte { bufp := b.pool.Get().(*[]byte) return (*bufp)[:b.sz] } func newBufPool(sz int) httputil.BufferPool {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Apr 07 05:42:10 GMT 2023 - 5.6K bytes - Viewed (0)