diff options
| author | Russ Cox <rsc@golang.org> | 2008-12-18 15:42:28 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2008-12-18 15:42:28 -0800 |
| commit | e29ce175eda2016b93e755b6a5ae759b5b692834 (patch) | |
| tree | 50267429e2432b2039d63c2514b6099a2421d455 /src/runtime/proc.c | |
| parent | 6ccca61510ac3e3a9e96019bc6bfb1286cac080e (diff) | |
| download | go-e29ce175eda2016b93e755b6a5ae759b5b692834.tar.xz | |
malloc in runtime (not used by default)
R=r
DELTA=1551 (1550 added, 0 deleted, 1 changed)
OCL=21404
CL=21538
Diffstat (limited to 'src/runtime/proc.c')
| -rw-r--r-- | src/runtime/proc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/proc.c b/src/runtime/proc.c index 68d06788e4..2d9ce77efd 100644 --- a/src/runtime/proc.c +++ b/src/runtime/proc.c @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. #include "runtime.h" +#include "malloc.h" /* so that acid generated from proc.c includes malloc data structures */ typedef struct Sched Sched; @@ -95,6 +96,8 @@ schedinit(void) int32 n; byte *p; + mallocinit(); + sched.gomaxprocs = 1; p = getenv("GOMAXPROCS"); if(p != nil && (n = atoi(p)) != 0) @@ -403,6 +406,8 @@ starttheworld(void) void mstart(void) { + if(m->mcache == nil) + m->mcache = allocmcache(); minit(); scheduler(); } |
