]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: introduce MemStatsType
authorRuss Cox <rsc@golang.org>
Sun, 7 Feb 2010 09:20:44 +0000 (01:20 -0800)
committerRuss Cox <rsc@golang.org>
Sun, 7 Feb 2010 09:20:44 +0000 (01:20 -0800)
R=ken2
CC=golang-dev
https://golang.org/cl/204061

src/pkg/runtime/extern.go

index 53b86b764dabecc73e483b13d9f57c5d94180c2c..a397c3b90576a77f647a04daa8d2d3c07e797769 100644 (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