Commit c5b2c370 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: fix plan9/windows build

Fix few remaining cases after cl/117580043.

TBR=dfc
R=golang-codereviews
CC=dave, golang-codereviews
https://golang.org/cl/124850043
parent cd2f8356
......@@ -60,7 +60,7 @@ runtime·compilecallback(Eface fn, bool cleanstack)
}
if(n >= cb_max)
runtime·throw("too many callback functions");
c = runtime·mal(sizeof *c);
c = runtime·mallocgc(sizeof *c, nil, 0);
c->gobody = fn.data;
c->argsize = argsize;
c->cleanstack = cleanstack;
......
......@@ -33,7 +33,7 @@ runtime·getenv(int8 *s)
runtime·memclr(b, sizeof b);
p = b;
}else
p = runtime·malloc(n+1);
p = runtime·mallocgc(n+1, nil, 0);
r = runtime·pread(fd, p, n, 0);
runtime·close(fd);
if(r < 0)
......
......@@ -20,11 +20,11 @@ runtime·mpreinit(M *mp)
// Initialize stack and goroutine for note handling.
mp->gsignal = runtime·malg(32*1024);
mp->gsignal->m = mp;
mp->notesig = (int8*)runtime·malloc(ERRMAX*sizeof(int8));
mp->notesig = (int8*)runtime·mallocgc(ERRMAX*sizeof(int8), nil, 0);
// Initialize stack for handling strings from the
// errstr system call, as used in package syscall.
mp->errstr = (byte*)runtime·malloc(ERRMAX*sizeof(byte));
mp->errstr = (byte*)runtime·mallocgc(ERRMAX*sizeof(byte), nil, 0);
}
// Called to initialize a new m (including the bootstrap m).
......
......@@ -143,7 +143,7 @@ runtime·goenvs(void)
for(p=env; *p; n++)
p += runtime·findnullw(p)+1;
s = runtime·malloc(n*sizeof s[0]);
s = runtime·mallocgc(n*sizeof s[0], nil, 0);
p = env;
for(i=0; i<n; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment