Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,133 for Allocations (0.12 sec)

  1. src/go/printer/testdata/comments2.input

       _ = xxxxxxxxxxxxxxxxxxxxxxxxxxxx // comment
       _ = yyyyyyyyyyyyyyyy // comment - should be aligned
    
    // test case from issue
    label:
       mask := uint64(1)<<c - 1 // Allocation mask
       used := atomic.LoadUint64(&h.used) // Current allocations
    }
    
    // Test cases for issue 18782
    var _ = [][]int{
       /*       a, b, c, d, e */
       /* a */ {0, 0, 0, 0, 0},
       /* b */ {0, 5, 4, 4, 4},
       /* c */ {0, 4, 5, 4, 4},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 00:06:54 UTC 2017
    - 2.3K bytes
    - Viewed (0)
  2. cmd/benchmark-utils_test.go

    	// generate md5sum for the generated data.
    	// md5sum of the data to written is required as input for PutObject.
    
    	md5hex := getMD5Hash(textData)
    	sha256hex := ""
    
    	// benchmark utility which helps obtain number of allocations and bytes allocated per ops.
    	b.ReportAllocs()
    	// the actual benchmark for PutObject starts here. Reset the benchmark timer.
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		// insert the object.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Dec 23 15:46:00 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    	h.Reset()
    
    	// try to force stack allocation
    	var a [4]byte
    	b := a[:]
    
    	writeLengthPrefixedString(h, b, token)
    	// encode the length of audiences to avoid ambiguities
    	writeLength(h, b, len(auds))
    	for _, aud := range auds {
    		writeLengthPrefixedString(h, b, aud)
    	}
    
    	key := toString(h.Sum(nil)) // skip base64 encoding to save an allocation
    
    	hashPool.Put(h)
    
    	return key
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  4. src/runtime/metrics/doc.go

    	/gc/heap/objects:objects
    		Number of objects, live or unswept, occupying heap memory.
    
    	/gc/heap/tiny/allocs:objects
    		Count of small allocations that are packed together into blocks.
    		These allocations are counted separately from other allocations
    		because each individual allocation is not tracked by the
    		runtime, only their block. Each block is already accounted for
    		in allocs-by-size and frees-by-size.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:58:43 UTC 2024
    - 20K bytes
    - Viewed (0)
  5. src/sync/oncefunc_test.go

    	calls := 0
    	f := sync.OnceFunc(func() { calls++ })
    	allocs := testing.AllocsPerRun(10, f)
    	if calls != 1 {
    		t.Errorf("want calls==1, got %d", calls)
    	}
    	if allocs != 0 {
    		t.Errorf("want 0 allocations per call, got %v", allocs)
    	}
    }
    
    func TestOnceValue(t *testing.T) {
    	calls := 0
    	f := sync.OnceValue(func() int {
    		calls++
    		return calls
    	})
    	allocs := testing.AllocsPerRun(10, func() { f() })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:31:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. src/cmd/trace/viewer.go

    package main
    
    import (
    	"fmt"
    	"internal/trace"
    	"internal/trace/traceviewer"
    	"time"
    )
    
    // viewerFrames returns the frames of the stack of ev. The given frame slice is
    // used to store the frames to reduce allocations.
    func viewerFrames(stk trace.Stack) []*trace.Frame {
    	var frames []*trace.Frame
    	stk.Frames(func(f trace.StackFrame) bool {
    		frames = append(frames, &trace.Frame{
    			PC:   f.PC,
    			Fn:   f.Func,
    			File: f.File,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. src/runtime/mstats.go

    		nFree += f
    		bySize[i].Frees = f
    	}
    
    	// Account for tiny allocations.
    	// For historical reasons, MemStats includes tiny allocations
    	// in both the total free and total alloc count. This double-counts
    	// memory in some sense because their tiny allocation block is also
    	// counted. Tracking the lifetime of individual tiny allocations is
    	// currently not done because it would be too expensive.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 21:03:13 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  8. src/unique/handle.go

    }
    
    func addUniqueMap[T comparable](typ *abi.Type) *uniqueMap[T] {
    	// Create a map for T and try to register it. We could
    	// race with someone else, but that's fine; it's one
    	// small, stray allocation. The number of allocations
    	// this can create is bounded by a small constant.
    	m := &uniqueMap[T]{
    		HashTrieMap: concurrent.NewHashTrieMap[T, weak.Pointer[T]](),
    		cloneSeq:    makeCloneSeq(typ),
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 16:01:55 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/test/issue50182_test.go

    // license that can be found in the LICENSE file.
    
    package test
    
    import (
    	"fmt"
    	"sort"
    	"testing"
    )
    
    // Test that calling methods on generic types doesn't cause allocations.
    func genericSorted[T sort.Interface](data T) bool {
    	n := data.Len()
    	for i := n - 1; i > 0; i-- {
    		if data.Less(i, i-1) {
    			return false
    		}
    	}
    	return true
    }
    func TestGenericSorted(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 13 23:35:37 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/topologymanager/topology_manager.go

    // NUMA locality.
    type HintProvider interface {
    	// GetTopologyHints returns a map of resource names to a list of possible
    	// concrete resource allocations in terms of NUMA locality hints. Each hint
    	// is optionally marked "preferred" and indicates the set of NUMA nodes
    	// involved in the hypothetical allocation. The topology manager calls
    	// this function for each hint provider, and merges the hints to produce
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 15 12:43:16 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top