diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-07-31 12:55:40 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-07-31 12:55:40 +0400 |
| commit | cecca43804e0bd795581b6ec6a376509ed5fea05 (patch) | |
| tree | 9191435c3e8045795565382e800410692df81782 /src/pkg/runtime/panic.c | |
| parent | 17992f7a06c99b85429aa16118388551a7cc38bb (diff) | |
| download | go-cecca43804e0bd795581b6ec6a376509ed5fea05.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/panic.c')
| -rw-r--r-- | src/pkg/runtime/panic.c | 3 |
1 files changed, 1 insertions, 2 deletions
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. |
