- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 260 for buffers (0.1 sec)
-
internal/grid/grid.go
const ( // minBufferSize is the minimum buffer size. // Buffers below this is not reused. minBufferSize = 1 << 10 // defaultBufferSize is the default buffer allocation size. defaultBufferSize = 4 << 10 // maxBufferSize is the maximum buffer size. // Buffers larger than this is not reused. maxBufferSize = 96 << 10 // This is the assumed size of bigger buffers and allocation size. biggerBufMin = 32 << 10
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 6.9K bytes - Viewed (0) -
internal/bpool/bpool_test.go
if uint64(len(bp.c)) != size { t.Fatalf("bytepool size invalid: got %v want %v", len(bp.c), size) } // lets drain the buf channel first before we validate invalid buffers. for i := uint64(0); i < size; i++ { bp.Get() // discard } // Try putting some invalid buffers into pool bp.Put(make([]byte, bp.w, bp.wcap-1)) // wrong capacity is rejected (less) bp.Put(make([]byte, bp.w, bp.wcap+1)) // wrong capacity is rejected (more)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 2.8K bytes - Viewed (0) -
internal/http/dial_linux.go
// with dead end because tcp-keepalive is not fired when there is data in the socket buffer. // https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/ // This is a sensitive configuration, it is better to set it to high values, > 60 secs since it can // affect clients reading data with a very slow pace (disappropriate with socket buffer sizes) if opts.UserTimeout > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 23 10:53:03 UTC 2024 - 5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ReaderInputStream.java
private static int availableCapacity(Buffer buffer) { return buffer.capacity() - buffer.limit(); } /** * Flips the buffer output buffer so we can start reading bytes from it. If we are starting to * drain because there was overflow, and there aren't actually any characters to drain, then the * overflow must be due to a small output buffer. */ private void startDraining(boolean overflow) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 9.3K bytes - Viewed (0) -
guava/src/com/google/common/io/ReaderInputStream.java
private static int availableCapacity(Buffer buffer) { return buffer.capacity() - buffer.limit(); } /** * Flips the buffer output buffer so we can start reading bytes from it. If we are starting to * drain because there was overflow, and there aren't actually any characters to drain, then the * overflow must be due to a small output buffer. */ private void startDraining(boolean overflow) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 9.3K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteStreams.java
int initialBufferSize = min(BUFFER_SIZE, max(128, Integer.highestOneBit(totalLen) * 2)); // Starting with an 8k buffer, double the size of each successive buffer. Smaller buffers // quadruple in size until they reach 8k, to minimize the number of small reads for longer // streams. Buffers are retained in a deque so that there's no copying between buffers while
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 29.7K bytes - Viewed (0) -
cmd/erasure-decode.go
if p.buf[bufIdx] == nil { // Reading first time on this disk, hence the buffer needs to be allocated. // Subsequent reads will reuse this buffer. p.buf[bufIdx] = make([]byte, p.shardSize) } // For the last shard, the shardsize might be less than previous shard sizes. // Hence the following statement ensures that the buffer size is reset to the right size. p.buf[bufIdx] = p.buf[bufIdx][:p.shardSize]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 9.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java
* InterruptibleChannel and JavaLangAccess.blockedOn(Thread, Interruptible), it isn't * predictable what work might be done. (e.g., close a file and flush buffers to disk). To * protect ourselves from this, we park ourselves and tell our interrupter that we did so. */ if (state == PARKED || compareAndSet(state, PARKED)) { // Interrupting Cow Says:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java
private static long fingerprint(byte[] bytes, int length) { return HASH_FN.hashBytes(bytes, 0, length).asLong(); } /** * Tests that the Java port of FarmHashFingerprint64 provides the same results on buffers up to * 800 bytes long as the C++ reference implementation. */ public void testMultipleLengths() { int iterations = 800; byte[] buf = new byte[iterations * 4]; int bufLen = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.2K bytes - Viewed (0) -
cmd/dummy-data-generator_test.go
n2, e2 := io.ReadFull(r2, b2) if n1 != n2 { return false, fmt.Sprintf("Read %d != %d bytes from the readers", n1, n2) } if !bytes.Equal(b1[:n1], b2[:n2]) { return false, fmt.Sprintf("After reading %d equal buffers (32Kib each), we got the following two strings:\n%v\n%v\n", i, b1, b2) } // Check if stream has ended if (e1 == io.ErrUnexpectedEOF && e2 == io.ErrUnexpectedEOF) || (e1 == io.EOF && e2 == io.EOF) { break
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 4.7K bytes - Viewed (0)