URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [runtime/] [mem.go] - Rev 867
Go to most recent revision | Compare with Previous | Blame | View Log
// Copyright 2009 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package runtimeimport "unsafe"// A MemStats records statistics about the memory allocator.type MemStats struct {// General statistics.Alloc uint64 // bytes allocated and still in useTotalAlloc uint64 // bytes allocated (even if freed)Sys uint64 // bytes obtained from system (should be sum of XxxSys below)Lookups uint64 // number of pointer lookupsMallocs uint64 // number of mallocsFrees uint64 // number of frees// Main allocation heap statistics.HeapAlloc uint64 // bytes allocated and still in useHeapSys uint64 // bytes obtained from systemHeapIdle uint64 // bytes in idle spansHeapInuse uint64 // bytes in non-idle spanHeapObjects uint64 // total number of allocated objects// Low-level fixed-size structure allocator statistics.// Inuse is bytes used now.// Sys is bytes obtained from system.StackInuse uint64 // bootstrap stacksStackSys uint64MSpanInuse uint64 // mspan structuresMSpanSys uint64MCacheInuse uint64 // mcache structuresMCacheSys uint64BuckHashSys uint64 // profiling bucket hash table// Garbage collector statistics.NextGC uint64PauseTotalNs uint64PauseNs [256]uint64 // most recent GC pause timesNumGC uint32EnableGC boolDebugGC bool// Per-size allocation statistics.// 61 is NumSizeClasses in the C code.BySize [61]struct {Size uint32Mallocs uint64Frees uint64}}var Sizeof_C_MStats uintptr // filled in by malloc.gocvar VmemStats MemStatsfunc init() {if Sizeof_C_MStats != unsafe.Sizeof(VmemStats) {println(Sizeof_C_MStats, unsafe.Sizeof(VmemStats))panic("MStats vs MemStatsType size mismatch")}}// ReadMemStats populates m with memory allocator statistics.func ReadMemStats(m *MemStats)// GC runs a garbage collection.func GC()
Go to most recent revision | Compare with Previous | Blame | View Log
