1
0
mirror of https://github.com/golang/go synced 2024-11-27 01:01:21 -07:00

runtime: do not shrink stacks GOCOPYSTACK=0

LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, khr, rsc
https://golang.org/cl/76070043
This commit is contained in:
Dmitriy Vyukov 2014-03-14 21:11:04 +04:00
parent 22aa54965e
commit b8d40172ce

View File

@ -776,6 +776,8 @@ runtime·shrinkstack(G *gp)
uintptr used, oldsize, newsize;
MSpan *span;
if(!runtime·copystack)
return;
oldstk = (byte*)gp->stackguard - StackGuard;
oldbase = (byte*)gp->stackbase + sizeof(Stktop);
oldsize = oldbase - oldstk;