1
0
mirror of https://github.com/golang/go synced 2024-09-24 21:10:12 -06: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; uintptr used, oldsize, newsize;
MSpan *span; MSpan *span;
if(!runtime·copystack)
return;
oldstk = (byte*)gp->stackguard - StackGuard; oldstk = (byte*)gp->stackguard - StackGuard;
oldbase = (byte*)gp->stackbase + sizeof(Stktop); oldbase = (byte*)gp->stackbase + sizeof(Stktop);
oldsize = oldbase - oldstk; oldsize = oldbase - oldstk;