- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewBytePoolCap (0.23 sec)
-
internal/bpool/bpool.go
// BytePoolCap implements a leaky pool of []byte in the form of a bounded channel. type BytePoolCap struct { c chan []byte w int wcap int } // NewBytePoolCap creates a new BytePool bounded to the given maxSize, with new // byte arrays sized based on width. func NewBytePoolCap(maxSize uint64, width int, capwidth int) (bp *BytePoolCap) { if capwidth > 0 && capwidth < 64 { panic("buffer capped with smaller than 64 bytes is not supported")
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 19 16:44:59 GMT 2024 - 2.6K bytes - Viewed (0) -
internal/bpool/bpool_test.go
package bpool import "testing" // Tests - bytePool functionality. func TestBytePool(t *testing.T) { size := uint64(4) width := 1024 capWidth := 2048 bufPool := NewBytePoolCap(size, width, capWidth) // Check the width if bufPool.Width() != width { t.Fatalf("bytepool width invalid: got %v want %v", bufPool.Width(), width) } // Check with width cap
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Jan 30 19:13:27 GMT 2024 - 2.6K bytes - Viewed (0) -
cmd/erasure-server-pool.go
} // Initialize byte pool once for all sets, bpool size is set to // setCount * setDriveCount with each memory upto blockSizeV2. buffers := bpool.NewBytePoolCap(n, blockSizeV2, blockSizeV2*2) buffers.Populate() globalBytePoolCap.Store(buffers) var localDrives []StorageAPI local := endpointServerPools.FirstLocal() for i, ep := range endpointServerPools {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 26 06:32:14 GMT 2024 - 80.1K bytes - Viewed (0)