- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 75 for memState (0.17 sec)
-
src/runtime/gc_test.go
*runtime.DoubleCheckReadMemStats = true } func TestReadMemStats(t *testing.T) { base, slow := runtime.ReadMemStatsSlow() if base != slow { logDiff(t, "MemStats", reflect.ValueOf(base), reflect.ValueOf(slow)) t.Fatal("memstats mismatch") } } func logDiff(t *testing.T, prefix string, got, want reflect.Value) { typ := got.Type() switch typ.Kind() { case reflect.Array, reflect.Slice:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 05 22:33:52 UTC 2024 - 17.6K bytes - Viewed (0) -
src/runtime/debug/garbage.go
// managed by the Go runtime). // // More specifically, the following expression accurately reflects // the value the runtime attempts to maintain as the limit: // // runtime.MemStats.Sys - runtime.MemStats.HeapReleased // // or in terms of the runtime/metrics package: // // /memory/classes/total:bytes - /memory/classes/heap/released:bytes // // A zero limit or a limit that's lower than the amount of memory
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9.9K bytes - Viewed (0) -
pkg/ctrlz/home.go
} type homeInfo struct { ProcessName string HeapSize uint64 NumGC uint32 CurrentTime int64 Hostname string IP string } func getHomeInfo() *homeInfo { var ms runtime.MemStats runtime.ReadMemStats(&ms) hostName, _ := os.Hostname() return &homeInfo{ ProcessName: os.Args[0], HeapSize: ms.HeapAlloc, NumGC: ms.NumGC, CurrentTime: time.Now().UnixNano(),
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 2.5K bytes - Viewed (0) -
src/runtime/malloc_test.go
"time" "unsafe" ) var testMemStatsCount int func TestMemStats(t *testing.T) { testMemStatsCount++ // Make sure there's at least one forced GC. GC() // Test that MemStats has sane values. st := new(MemStats) ReadMemStats(st) nz := func(x any) error { if x != reflect.Zero(reflect.TypeOf(x)).Interface() { return nil } return fmt.Errorf("zero value") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:29 UTC 2023 - 10.6K bytes - Viewed (0) -
test/fixedbugs/issue9110.go
import ( "runtime" "runtime/debug" "sync" "time" ) func main() { runtime.GOMAXPROCS(1) debug.SetGCPercent(1000000) // only GC when we ask for GC var stats, stats1, stats2 runtime.MemStats release := func() {} for i := 0; i < 20; i++ { if i == 10 { // Should be warmed up by now. runtime.ReadMemStats(&stats1) } c := make(chan int) for i := 0; i < 10; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 1.7K bytes - Viewed (0) -
test/fixedbugs/issue15281.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 17 09:45:44 UTC 2020 - 1.2K bytes - Viewed (0) -
src/runtime/pprof/pprof.go
} func writeHeapInternal(w io.Writer, debug int, defaultSampleType string) error { var memStats *runtime.MemStats if debug != 0 { // Read mem stats first, so that our other allocations // do not appear in the statistics. memStats = new(runtime.MemStats) runtime.ReadMemStats(memStats) } // Find out how many records there are (MemProfile(nil, true)),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 30.6K bytes - Viewed (0) -
src/runtime/mheap.go
h.cachealloc.init(unsafe.Sizeof(mcache{}), nil, nil, &memstats.mcache_sys) h.specialfinalizeralloc.init(unsafe.Sizeof(specialfinalizer{}), nil, nil, &memstats.other_sys) h.specialprofilealloc.init(unsafe.Sizeof(specialprofile{}), nil, nil, &memstats.other_sys) h.specialReachableAlloc.init(unsafe.Sizeof(specialReachable{}), nil, nil, &memstats.other_sys)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 78K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/cgonoescape.go
//go:noinline func withoutNoEscape() { var str string C.runCWithoutNoEscape(unsafe.Pointer(&str)) } func CgoNoEscape() { // make GC stop to see the heap objects allocated debug.SetGCPercent(-1) var stats runtime.MemStats runtime.ReadMemStats(&stats) preHeapObjects := stats.HeapObjects for i := 0; i < num; i++ { withNoEscape() } runtime.ReadMemStats(&stats) nowHeapObjects := stats.HeapObjects
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 16:43:23 UTC 2023 - 1.8K bytes - Viewed (0) -
pkg/ctrlz/topics/assets/templates/mem.html
{{ define "content" }} <p> This information is gathered from the Go runtime and represents the ongoing memory consumption of this process. Please refer to the <a href="https://golang.org/pkg/runtime/#MemStats">Go documentation on the MemStats type</a> for more information about all of these values. </p> <table> <thead> <tr> <th>Counter</th> <th>Value</th> <th>Description</th> </tr>
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 7.2K bytes - Viewed (0)