From 30ef2c7debeeb9f5bcab8cd2c60a8587f35bc0ae Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Tue, 19 Aug 2014 11:46:05 +0400 Subject: runtime: fix memstats Newly allocated memory is subtracted from inuse, while it was never added to inuse. Span leftovers are subtracted from both inuse and idle, while they were never added. Fixes #8544. Fixes #8430. LGTM=khr, cookieo9 R=golang-codereviews, khr, cookieo9 CC=golang-codereviews, rlh, rsc https://golang.org/cl/130200044 --- src/pkg/runtime/malloc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pkg/runtime/malloc.h') diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h index 963e71c42f..a700956b0c 100644 --- a/src/pkg/runtime/malloc.h +++ b/src/pkg/runtime/malloc.h @@ -283,6 +283,7 @@ struct MStats #define mstats runtime·memstats extern MStats mstats; void runtime·updatememstats(GCStats *stats); +void runtime·ReadMemStats(MStats *stats); // Size classes. Computed and initialized by InitSizes. // -- cgit v1.3