summaryrefslogtreecommitdiff
path: root/src/runtime/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/proc.c')
-rw-r--r--src/runtime/proc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/proc.c b/src/runtime/proc.c
index 68d06788e..2d9ce77ef 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();
}