Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for newBufPool (0.17 sec)

  1. internal/handlers/forwarder.go

    		// 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 {
    	return &bufPool{sz: sz, pool: sync.Pool{
    		New: func() interface{} {
    			buf := make([]byte, sz)
    			return &buf
    		},
    	}}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 07 05:42:10 GMT 2023
    - 5.6K bytes
    - Viewed (0)
Back to top