From: Dmitriy Vyukov Date: Fri, 14 Mar 2014 17:11:04 +0000 (+0400) Subject: runtime: do not shrink stacks GOCOPYSTACK=0 X-Git-Tag: go1.3beta1~357 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b8d40172ce2a724ecb125746f37aee989ced5ac9;p=gostls13.git runtime: do not shrink stacks GOCOPYSTACK=0 LGTM=rsc R=golang-codereviews CC=golang-codereviews, khr, rsc https://golang.org/cl/76070043 --- diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index d580665e2b..81005de5d7 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -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;