Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 842 for allocations (0.34 sec)

  1. test/fixedbugs/issue36516.go

    func main() {
    	n := testing.AllocsPerRun(1000, func() {
    		x = unsafe.Pointer(uintptr(x) + 1)
    		x = unsafe.Pointer(uintptr(x) - 1)
    	})
    	if n > 0 {
    		panic(fmt.Sprintf("too many allocations; want 0 got %f", n))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 540 bytes
    - Viewed (0)
  2. src/runtime/mfixalloc.go

    // Malloc uses a FixAlloc wrapped around sysAlloc to manage its
    // mcache and mspan objects.
    //
    // Memory returned by fixalloc.alloc is zeroed by default, but the
    // caller may take responsibility for zeroing allocations by setting
    // the zero flag to false. This is only safe if the memory never
    // contains heap pointers.
    //
    // The caller is responsible for locking around FixAlloc calls.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 24 20:28:25 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. src/runtime/metrics/description.go

    		Kind:        KindUint64,
    	},
    	{
    		Name: "/gc/heap/tiny/allocs:objects",
    		Description: "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 Dec 06 17:59:12 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. pkg/monitoring/distribution.go

    	api "go.opentelemetry.io/otel/metric"
    
    	"istio.io/istio/pkg/log"
    )
    
    type distribution struct {
    	baseMetric
    	d api.Float64Histogram
    	// precomputedRecordOption is just a precomputation to avoid allocations on each record call
    	precomputedRecordOption []api.RecordOption
    }
    
    var _ Metric = &distribution{}
    
    func newDistribution(o options) *distribution {
    	d, err := meter().Float64Histogram(o.name,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top