From c80f5b9bf7c67e1338d04bc0cf21fe285c3a80df Mon Sep 17 00:00:00 2001 From: Carl Shapiro Date: Thu, 4 Apr 2013 14:18:52 -0700 Subject: runtime: use a distinct pattern to mark free blocks in need of zeroing R=golang-dev, dvyukov, khr, cshapiro CC=golang-dev https://golang.org/cl/8392043 --- src/pkg/runtime/malloc.goc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/malloc.goc') diff --git a/src/pkg/runtime/malloc.goc b/src/pkg/runtime/malloc.goc index a30129ffc1..f1d25a793f 100644 --- a/src/pkg/runtime/malloc.goc +++ b/src/pkg/runtime/malloc.goc @@ -160,7 +160,7 @@ runtime·free(void *v) if(sizeclass == 0) { // Large object. size = s->npages<start<start< sizeof(uintptr)) - ((uintptr*)v)[1] = 1; // mark as "needs to be zeroed" + ((uintptr*)v)[1] = (uintptr)0xfeedfeedfeedfeedll; // mark as "needs to be zeroed" // Must mark v freed before calling MCache_Free: // it might coalesce v and other blocks into a bigger span // and change the bitmap further. -- cgit v1.3-5-g9baa