1
0
mirror of https://github.com/golang/go synced 2024-09-25 15:20:13 -06:00

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
This commit is contained in:
Dmitriy Vyukov 2014-08-07 13:28:10 +04:00
parent cd2f8356ce
commit c5b2c370c6
4 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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).

View File

@ -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++) {