Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for AllocBytes (0.09 sec)

  1. src/runtime/pprof/pprof.go

    	// other 4-column profiles where alloc != inuse.
    	// The easiest way to avoid this bug is to adjust allocBytes so it's never == inuseBytes.
    	// pprof doesn't use these header values anymore except for checking equality.
    	inUseBytes := total.InUseBytes()
    	allocBytes := total.AllocBytes
    	if inUseBytes == allocBytes {
    		allocBytes++
    	}
    
    	fmt.Fprintf(w, "heap profile: %d: %d [%d: %d] @ heap/%d\n",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  2. src/math/big/nat_test.go

    		prod := string(nat(nil).mulRange(r.a, r.b).utoa(10))
    		if prod != r.prod {
    			t.Errorf("#%d: got %s; want %s", i, prod, r.prod)
    		}
    	}
    }
    
    // allocBytes returns the number of bytes allocated by invoking f.
    func allocBytes(f func()) uint64 {
    	var stats runtime.MemStats
    	runtime.ReadMemStats(&stats)
    	t := stats.TotalAlloc
    	f()
    	runtime.ReadMemStats(&stats)
    	return stats.TotalAlloc - t
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 09 15:29:36 UTC 2024
    - 26.2K bytes
    - Viewed (0)
Back to top