aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stack.c
diff options
context:
space:
mode:
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;