]> Cypherpunks repositories - gostls13.git/commit
runtime: fix memstats
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 19 Aug 2014 07:46:05 +0000 (11:46 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 19 Aug 2014 07:46:05 +0000 (11:46 +0400)
commit30ef2c7debeeb9f5bcab8cd2c60a8587f35bc0ae
tree3ad08e90ec14387b44b3bd168253bda6b19eea42
parent2de65cad54da0f7fe3ff6aafb3cd70ad36146e2b
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
src/pkg/runtime/malloc_test.go
src/pkg/runtime/mheap.c