• Dmitriy Vyukov's avatar
    runtime: fix and speedup malloc stats · c075d82c
    Dmitriy Vyukov authored
    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
    c075d82c
mheap.c 14.7 KB