aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stack.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-03-14 21:11:04 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-03-14 21:11:04 +0400
commitb8d40172ce2a724ecb125746f37aee989ced5ac9 (patch)
tree09aaa2a1e10dd0b1f426d0754b106d176c45ecfe /src/pkg/runtime/stack.c
parent22aa54965e1cc7f0a2b194588c1bd8c7c627182d (diff)
downloadgo-b8d40172ce2a724ecb125746f37aee989ced5ac9.tar.xz
runtime: do not shrink stacks GOCOPYSTACK=0
LGTM=rsc R=golang-codereviews CC=golang-codereviews, khr, rsc https://golang.org/cl/76070043
Diffstat (limited to 'src/pkg/runtime/stack.c')
-rw-r--r--src/pkg/runtime/stack.c2
1 files changed, 2 insertions, 0 deletions
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;