diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-19 11:46:05 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-19 11:46:05 +0400 |
| commit | 30ef2c7debeeb9f5bcab8cd2c60a8587f35bc0ae (patch) | |
| tree | 3ad08e90ec14387b44b3bd168253bda6b19eea42 /src/pkg/runtime/malloc.h | |
| parent | 2de65cad54da0f7fe3ff6aafb3cd70ad36146e2b (diff) | |
| download | go-30ef2c7debeeb9f5bcab8cd2c60a8587f35bc0ae.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/malloc.h')
| -rw-r--r-- | src/pkg/runtime/malloc.h | 1 |
1 files changed, 1 insertions, 0 deletions
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. // |
