]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: do not zero blocks on free (this time for sure!)
authorRuss Cox <rsc@golang.org>
Wed, 10 Feb 2010 19:31:00 +0000 (11:31 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 10 Feb 2010 19:31:00 +0000 (11:31 -0800)
R=iant
CC=golang-dev
https://golang.org/cl/207054

src/pkg/runtime/malloc.cgo

index 8c945baebdebd1d1440d97543470329ae9b2fbd7..53411da1b198460e78371c43ddb91384048db9bc 100644 (file)
@@ -130,7 +130,6 @@ free(void *v)
        size = class_to_size[sizeclass];
        if(size > sizeof(uintptr))
                ((uintptr*)v)[1] = 1;   // mark as "needs to be zeroed"
-       runtime_memclr(v, size);
        mstats.alloc -= size;
        mstats.by_size[sizeclass].nfree++;
        MCache_Free(c, v, sizeclass, size);