]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix counting of free objects
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Tue, 15 May 2012 15:48:58 +0000 (11:48 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 15 May 2012 15:48:58 +0000 (11:48 -0400)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6206056

src/pkg/runtime/malloc.goc

index 4bea5e220c46e90f889eb405075823d750ac5cd1..c2727bf2b4fa7c23252cd3ec005750344632ab4a 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);