From b8d40172ce2a724ecb125746f37aee989ced5ac9 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Fri, 14 Mar 2014 21:11:04 +0400 Subject: [PATCH] runtime: do not shrink stacks GOCOPYSTACK=0 LGTM=rsc R=golang-codereviews CC=golang-codereviews, khr, rsc https://golang.org/cl/76070043 --- src/pkg/runtime/stack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index d580665e2bd..81005de5d7b 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;