- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 101 for cap (0.03 sec)
-
internal/handlers/forwarder.go
sz int pool bpool.Pool[*[]byte] } 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() if bufp == nil || cap(*bufp) < b.sz { return make([]byte, 0, b.sz) } return (*bufp)[:b.sz] }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Feb 18 16:25:55 UTC 2025 - 5.7K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbTransportInternal.java
/** * Checks if the transport supports the specified capability. * * @param cap the capability flag to check * @return whether the transport has the given capability * @throws SmbException if an error occurs checking capabilities */ boolean hasCapability(int cap) throws SmbException; /** * Checks if the transport has been disconnected. *Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 4.5K bytes - Viewed (0) -
src/bytes/buffer_test.go
var cap0 int for i := 0; i < 5<<10; i++ { b.Write(buf) b.Read(buf) if i == 0 { cap0 = b.Cap() } } cap1 := b.Cap() // (*Buffer).grow allows for 2x capacity slop before sliding, // so set our error threshold at 3x. if cap1 > cap0*3 { t.Errorf("buffer cap = %d; too big (grew from %d)", cap1, cap0) } } func BenchmarkWriteByte(b *testing.B) { const n = 4 << 10Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Fri Nov 14 19:01:17 UTC 2025 - 19.4K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbTreeHandleInternal.java
/** * Checks if the server has the specified capability * @param cap the capability flag to check * @return whether the capability is present * @throws CIFSException if an error occurs checking capabilities */ boolean hasCapability(int cap) throws CIFSException; /** * Gets the send buffer size of the underlying SMB connectionRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 3K bytes - Viewed (0) -
cmd/batch-expire_gen.go
return } case "Rules": var zb0002 uint32 zb0002, err = dc.ReadArrayHeader() if err != nil { err = msgp.WrapError(err, "Rules") return } if cap(z.Rules) >= int(zb0002) { z.Rules = (z.Rules)[:zb0002] } else { z.Rules = make([]BatchJobExpireFilter, zb0002) } for za0001 := range z.Rules { err = z.Rules[za0001].DecodeMsg(dc) if err != nil {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 19.9K bytes - Viewed (0) -
src/arena/arena.go
// not be used after the arena is freed. Accessing the underlying storage of the // slice after free may result in a fault, but this fault is also not guaranteed. func MakeSlice[T any](a *Arena, len, cap int) []T { var sl []T runtime_arena_arena_Slice(a.a, &sl, cap) return sl[:len] } // Clone makes a shallow copy of the input value that is no longer bound to any // arena it may have been allocated from, returning the copy. If it was not
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Wed Oct 12 20:23:36 UTC 2022 - 4.3K bytes - Viewed (0) -
cmd/erasure-server-pool-rebalance_gen.go
return } case "rss": var zb0002 uint32 zb0002, err = dc.ReadArrayHeader() if err != nil { err = msgp.WrapError(err, "PoolStats") return } if cap(z.PoolStats) >= int(zb0002) { z.PoolStats = (z.PoolStats)[:zb0002] } else { z.PoolStats = make([]*rebalanceStats, zb0002) } for za0001 := range z.PoolStats { if dc.IsNil() {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 26.8K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) Len() int { return len(b.buf) - b.off } // Cap returns the capacity of the buffer's underlying byte slice, that is, the // total space allocated for the buffer's data. func (b *Buffer) Cap() int { return cap(b.buf) } // Available returns how many bytes are unused in the buffer. func (b *Buffer) Available() int { return cap(b.buf) - len(b.buf) }
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Fri Nov 14 19:01:17 UTC 2025 - 16.5K bytes - Viewed (0) -
cmd/handler-api.go
} if tc, ok := r.Context().Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt); ok { tc.FuncName = "s3.MaxClients" } w.Header().Set("X-RateLimit-Limit", strconv.Itoa(cap(pool))) w.Header().Set("X-RateLimit-Remaining", strconv.Itoa(cap(pool)-len(pool))) ctx := r.Context() select { case pool <- struct{}{}: defer func() { <-pool }() globalHTTPStats.addRequestsInQueue(-1)
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 10.4K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/rdma/RdmaTransport.java
return statistics; } // Delegate all SmbTransportInternal methods to the wrapped transport @Override public boolean hasCapability(int cap) throws SmbException { return delegate.hasCapability(cap); } @Override public boolean isDisconnected() { return delegate.isDisconnected(); } @OverrideRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 23 05:11:12 UTC 2025 - 8.9K bytes - Viewed (0)