Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 2,047 for Mallocs (0.27 sec)

  1. src/reflect/all_test.go

    	if testing.Short() {
    		t.Skip("skipping malloc count in short mode")
    	}
    	v := ValueOf(S{})
    	if allocs := testing.AllocsPerRun(100, func() { v.Interface() }); allocs > 0 {
    		t.Error("allocs:", allocs)
    	}
    }
    
    func TestAllocsInterfaceSmall(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping malloc count in short mode")
    	}
    	v := ValueOf(int64(0))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  2. src/path/path_test.go

    	if testing.Short() {
    		t.Skip("skipping malloc count in short mode")
    	}
    	if runtime.GOMAXPROCS(0) > 1 {
    		t.Log("skipping AllocsPerRun checks; GOMAXPROCS>1")
    		return
    	}
    
    	for _, test := range cleantests {
    		allocs := testing.AllocsPerRun(100, func() { Clean(test.result) })
    		if allocs > 0 {
    			t.Errorf("Clean(%q): %v allocs, want zero", test.result, allocs)
    		}
    	}
    }
    
    type SplitTest struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 13 01:12:09 UTC 2020
    - 4.6K bytes
    - Viewed (0)
  3. platforms/documentation/docs/src/snippets/native-binaries/cunit/groovy/libs/cunit/2.1-2/include/CUnit/MyMem.h

      #define CU_DUMP_MEMORY_USAGE(x) CU_dump_memory_usage((x))
    #else   /* MEMTRACE */
      /** Standard calloc() if MEMTRACE not defined. */
      #define CU_CALLOC(x, y)         calloc((x), (y))
      /** Standard malloc() if MEMTRACE not defined. */
      #define CU_MALLOC(x)            malloc((x))
      /** Standard free() if MEMTRACE not defined. */
      #define CU_FREE(x)              free((x))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 4K bytes
    - Viewed (0)
  4. src/runtime/proc.go

    			print(string(fmtNSAsMS(sbuf[:], uint64(end-start))), " ms clock, ")
    			print(string(itoa(sbuf[:], after.bytes-before.bytes)), " bytes, ")
    			print(string(itoa(sbuf[:], after.allocs-before.allocs)), " allocs")
    			print("\n")
    		}
    
    		t.state = 2 // initialization done
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  5. src/sort/search_test.go

    func TestSearchWrappersDontAlloc(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping malloc count in short mode")
    	}
    	if runtime.GOMAXPROCS(0) > 1 {
    		t.Skip("skipping; GOMAXPROCS>1")
    	}
    	allocs := testing.AllocsPerRun(100, runSearchWrappers)
    	if allocs != 0 {
    		t.Errorf("expected no allocs for runSearchWrappers, got %v", allocs)
    	}
    }
    
    func BenchmarkSearchWrappers(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 07 14:42:13 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  6. src/runtime/mcache.go

    var emptymspan mspan
    
    func allocmcache() *mcache {
    	var c *mcache
    	systemstack(func() {
    		lock(&mheap_.lock)
    		c = (*mcache)(mheap_.cachealloc.alloc())
    		c.flushGen.Store(mheap_.sweepgen)
    		unlock(&mheap_.lock)
    	})
    	for i := range c.alloc {
    		c.alloc[i] = &emptymspan
    	}
    	c.nextSample = nextSample()
    	return c
    }
    
    // freemcache releases resources associated with this
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  7. pkg/cache/bench.baseline

    BenchmarkLRUGetConcurrent-8      	 1000000	      1984 ns/op	       0 B/op	       0 allocs/op
    BenchmarkLRUSet-8                	20000000	        64.7 ns/op	       0 B/op	       0 allocs/op
    BenchmarkLRUSetConcurrent-8      	 1000000	      2315 ns/op	       0 B/op	       0 allocs/op
    BenchmarkLRUGetSetConcurrent-8   	 1000000	      2299 ns/op	       0 B/op	       0 allocs/op
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc_test.go

    			}
    		} else if alloc >= item.upperBound {
    			if allocs[idx] != item.upperBound {
    				t.Fatalf("For requiredSum=%v, %s classes=%#+v got solution %v, %v in which item %d should be its upper bound but is not", requiredSum, style, classes, allocs, fairProp, idx)
    			}
    		} else if f64RelDiff(alloc, allocs[idx]) > fpSlack {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 18:17:27 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/test/issue53888_test.go

    			t.Errorf("got %f allocs, want 0", n)
    		}
    		type S []byte
    
    		s := make(S, n)
    		g := func() {
    			s = append(s[:0], make(S, n)...)
    		}
    		if n := testing.AllocsPerRun(10, g); n > 0 {
    			t.Errorf("got %f allocs, want 0", n)
    		}
    		h := func() {
    			s = append(s[:0], make([]byte, n)...)
    		}
    		if n := testing.AllocsPerRun(10, h); n > 0 {
    			t.Errorf("got %f allocs, want 0", n)
    		}
    		i := func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 09 12:18:20 UTC 2022
    - 1K bytes
    - Viewed (0)
  10. src/runtime/testdata/testprog/gc.go

    	// Alternate between whether the chunk will be held live or will be
    	// condemned to GC to create holes in the heap.
    	saved := make([][]byte, allocs/2+1)
    	condemned := make([][]byte, allocs/2)
    	for i := 0; i < allocs; i++ {
    		b := make([]byte, allocChunk)
    		if i%2 == 0 {
    			saved = append(saved, b)
    		} else {
    			condemned = append(condemned, b)
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 12.1K bytes
    - Viewed (0)
Back to top