summaryrefslogtreecommitdiff
path: root/test/mallocrand.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/mallocrand.go')
-rw-r--r--test/mallocrand.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/mallocrand.go b/test/mallocrand.go
index 726e36799..69d07cec5 100644
--- a/test/mallocrand.go
+++ b/test/mallocrand.go
@@ -21,8 +21,9 @@ var footprint uint64
var allocated uint64
func bigger() {
- runtime.UpdateMemStats()
- if f := runtime.MemStats.Sys; footprint < f {
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(memstats)
+ if f := memstats.Sys; footprint < f {
footprint = f
if *chatty {
println("Footprint", footprint, " for ", allocated)