aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/panic.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-05-28 22:14:47 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-05-28 22:14:47 +0400
commit8bbb08533dab0dcf627db0b76ba65c3fb9b1d682 (patch)
treeba5ba2fd1edb5cbce11b235bd21eeadabc65f0b6 /src/pkg/runtime/panic.c
parent671814b9044bebd9f5801cf83df74acbdf31d732 (diff)
downloadgo-8bbb08533dab0dcf627db0b76ba65c3fb9b1d682.tar.xz
runtime: make mheap statically allocated again
This depends on: 9791044: runtime: allocate page table lazily Once page table is moved out of heap, the heap becomes small. This removes unnecessary dereferences during heap access. No logical changes. R=golang-dev, khr CC=golang-dev https://golang.org/cl/9802043
Diffstat (limited to 'src/pkg/runtime/panic.c')
-rw-r--r--src/pkg/runtime/panic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c
index d0cf3ad6f9..ecce93ff16 100644
--- a/src/pkg/runtime/panic.c
+++ b/src/pkg/runtime/panic.c
@@ -384,7 +384,7 @@ nomatch:
void
runtime·startpanic(void)
{
- if(runtime·mheap == 0 || runtime·mheap->cachealloc.size == 0) { // very early
+ if(runtime·mheap.cachealloc.size == 0) { // very early
runtime·printf("runtime: panic before malloc heap initialized\n");
m->mallocing = 1; // tell rest of panic not to try to malloc
} else if(m->mcache == nil) // can happen if called from signal handler or throw