Currently processes crash with obscure message.
Say that it's "out of memory".
LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, khr, rsc
https://golang.org/cl/
75820045
runtime·printf("stackalloc %d\n", n);
gp->stacksize += n;
- if(runtime·debug.efence || StackFromSystem)
- return runtime·SysAlloc(ROUND(n, PageSize), &mstats.stacks_sys);
+ if(runtime·debug.efence || StackFromSystem) {
+ v = runtime·SysAlloc(ROUND(n, PageSize), &mstats.stacks_sys);
+ if(v == nil)
+ runtime·throw("out of memory (stackalloc)");
+ return v;
+ }
// Minimum-sized stacks are allocated with a fixed-size free-list allocator,
// but if we need a stack of a bigger size, we fall back on malloc