]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] runtime: fix counting of free objects
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Wed, 13 Jun 2012 20:23:53 +0000 (16:23 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 13 Jun 2012 20:23:53 +0000 (16:23 -0400)
««« backport 393bec50494e
runtime: fix counting of free objects

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6206056

»»»

src/pkg/runtime/malloc.goc

index fbdd6bb021ff2e9e1afa01f5c550ca2da424177a..9ae3a9d6194eaaf668fa02b9760ded78c0810ffd 100644 (file)
@@ -154,6 +154,7 @@ runtime·free(void *v)
                c->local_by_size[sizeclass].nfree++;
                runtime·MCache_Free(c, v, sizeclass, size);
        }
+       c->local_nfree++;
        c->local_alloc -= size;
        if(prof)
                runtime·MProf_Free(v, size);