From cecca43804e0bd795581b6ec6a376509ed5fea05 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Thu, 31 Jul 2014 12:55:40 +0400 Subject: runtime: get rid of free Several reasons: 1. Significantly simplifies runtime. 2. This code proved to be buggy. 3. Free is incompatible with bump-the-pointer allocation. 4. We want to write runtime in Go, Go does not have free. 5. Too much code to free env strings on startup. LGTM=khr R=golang-codereviews, josharian, tracey.brendan, khr CC=bradfitz, golang-codereviews, r, rlh, rsc https://golang.org/cl/116390043 --- src/pkg/runtime/panic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pkg/runtime/panic.c') diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index 04e0ec4b8c..af8bb1bc0e 100644 --- a/src/pkg/runtime/panic.c +++ b/src/pkg/runtime/panic.c @@ -68,8 +68,7 @@ freedefer(Defer *d) p->deferpool[sc] = d; // No need to wipe out pointers in argp/pc/fn/args, // because we empty the pool before GC. - } else - runtimeĀ·free(d); + } } // Create a new deferred function fn with siz bytes of arguments. -- cgit v1.3-5-g9baa