From da0a7d7b8f896bc2117ce488c4e245d626ef8aba Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 19 Dec 2008 03:13:39 -0800 Subject: malloc bug fixes. use malloc by default. free stacks. R=r DELTA=424 (333 added, 29 deleted, 62 changed) OCL=21553 CL=21584 --- src/runtime/proc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/runtime/proc.c') diff --git a/src/runtime/proc.c b/src/runtime/proc.c index 2d9ce77efd..01581569f7 100644 --- a/src/runtime/proc.c +++ b/src/runtime/proc.c @@ -97,6 +97,10 @@ schedinit(void) byte *p; mallocinit(); + + // Allocate internal symbol table representation now, + // so that we don't need to call malloc when we crash. + findfunc(0); sched.gomaxprocs = 1; p = getenv("GOMAXPROCS"); @@ -440,7 +444,7 @@ matchmg(void) notewakeup(&m->havenextg); }else{ m = mal(sizeof(M)); - m->g0 = malg(1024); + m->g0 = malg(8192); m->nextg = g; m->id = sched.mcount++; if(debug) { -- cgit v1.3