]> Cypherpunks repositories - gostls13.git/commit
runtime: fix and speedup malloc stats
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 22 May 2013 18:22:57 +0000 (22:22 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 22 May 2013 18:22:57 +0000 (22:22 +0400)
commitc075d82ccac5eb6fca481efccc798acac00f7dae
tree60d6fa4f2ba7f7a4055d0477b50966e41f0e893f
parent4c2df76b7dd9439566a71f8bb339295a5ef57be6
runtime: fix and speedup malloc stats
Currently per-sizeclass stats are lost for destroyed MCache's. This patch fixes this.
Also, only update mstats.heap_alloc on heap operations, because that's the only
stat that needs to be promptly updated. Everything else needs to be up-to-date only in ReadMemStats().

R=golang-dev, remyoudompheng, dave, iant
CC=golang-dev
https://golang.org/cl/9207047
src/pkg/runtime/malloc.goc
src/pkg/runtime/malloc.h
src/pkg/runtime/mgc0.c
src/pkg/runtime/mheap.c