1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:04:44 -07:00

runtime: introduce MemStatsType

R=ken2
CC=golang-dev
https://golang.org/cl/204061
This commit is contained in:
Russ Cox 2010-02-07 01:20:44 -08:00
parent ebf32c5868
commit 87915b6565

View File

@ -71,9 +71,7 @@ func Signame(sig int32) string
// be called during initialization.
func Siginit()
// MemStats holds statistics about the memory system.
// The statistics are only approximate, as they are not interlocked on update.
var MemStats struct {
type MemStatsType struct {
Alloc uint64
Sys uint64
Stacks uint64
@ -84,6 +82,10 @@ var MemStats struct {
EnableGC bool
}
// MemStats holds statistics about the memory system.
// The statistics are only approximate, as they are not interlocked on update.
var MemStats MemStatsType
// Alloc allocates a block of the given size.
// FOR TESTING AND DEBUGGING ONLY.
func Alloc(uintptr) *byte