• Dmitriy Vyukov's avatar
    runtime: fix memstats · 30ef2c7d
    Dmitriy Vyukov authored
    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
    30ef2c7d
malloc_test.go 3.84 KB