diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-05-12 12:49:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-05-12 12:49:34 +0000 |
commit | 06ace75d4bcebf8bcc021dfe918b9866fba3108c (patch) | |
tree | 08382cff0b3974233757b76703128dac8c0077ae /libgo/runtime/proc.c | |
parent | 7af1c0ad98613e1a8684b075ac2a6e4739b07b07 (diff) | |
download | gcc-06ace75d4bcebf8bcc021dfe918b9866fba3108c.zip gcc-06ace75d4bcebf8bcc021dfe918b9866fba3108c.tar.gz gcc-06ace75d4bcebf8bcc021dfe918b9866fba3108c.tar.bz2 |
runtime: fix build for non-split-stack systems
Change memory allocation accounting for stacks to use stacks_sys,
since that seems to be what it is for.
Reviewed-on: https://go-review.googlesource.com/43297
From-SVN: r247967
Diffstat (limited to 'libgo/runtime/proc.c')
-rw-r--r-- | libgo/runtime/proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index cc56642..14ee673 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -406,6 +406,8 @@ extern void globrunqput(G*) __asm__(GOSYM_PREFIX "runtime.globrunqput"); extern P* pidleget(void) __asm__(GOSYM_PREFIX "runtime.pidleget"); +extern struct mstats* getMemstats(void) + __asm__(GOSYM_PREFIX "runtime.getMemstats"); bool runtime_isstarted; @@ -726,7 +728,7 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re // 32-bit mode, the Go allocation space is all of // memory anyhow. if(sizeof(void*) == 8) { - void *p = runtime_sysAlloc(stacksize, &mstats()->other_sys); + void *p = runtime_sysAlloc(stacksize, &getMemstats()->stacks_sys); if(p == nil) runtime_throw("runtime: cannot allocate memory for goroutine stack"); *ret_stack = (byte*)p; |