aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-06-15 16:02:39 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-06-15 16:02:39 +0400
commit5caf762457420bf6df0298a8d363ab60216f03bc (patch)
tree0e5cf39dc6732368940858a079e637a8e5059d64 /src/pkg/runtime
parent8f6341d9eead70b2fa010a49f92e170682980d01 (diff)
downloadgo-5caf762457420bf6df0298a8d363ab60216f03bc.tar.xz
runtime: remove unused moreframesize_minalloc field
It was used to request large stack segment for GC when it was running not on g0. Now GC is running on g0 with large stack, and it is not needed anymore. R=golang-dev, dave CC=golang-dev https://golang.org/cl/10242045
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/runtime.h1
-rw-r--r--src/pkg/runtime/stack.c14
2 files changed, 3 insertions, 12 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index f004f1a42c..f62ee81de4 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -326,7 +326,6 @@ struct M
void* racepc;
void (*waitunlockf)(Lock*);
void* waitlock;
- uint32 moreframesize_minalloc;
uintptr settype_buf[1024];
uintptr settype_bufsize;
diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c
index a63e3b0c90..abfe0cfe43 100644
--- a/src/pkg/runtime/stack.c
+++ b/src/pkg/runtime/stack.c
@@ -173,7 +173,7 @@ runtime·oldstack(void)
void
runtime·newstack(void)
{
- int32 framesize, minalloc, argsize;
+ int32 framesize, argsize;
Stktop *top;
byte *stk;
uintptr sp;
@@ -196,19 +196,11 @@ runtime·newstack(void)
runtime·throw("runtime: stack split argsize");
}
- minalloc = 0;
reflectcall = framesize==1;
- if(reflectcall) {
+ if(reflectcall)
framesize = 0;
- // moreframesize_minalloc is only set in runtime·gc(),
- // that calls newstack via reflect·call().
- minalloc = m->moreframesize_minalloc;
- m->moreframesize_minalloc = 0;
- if(framesize < minalloc)
- framesize = minalloc;
- }
- if(reflectcall && minalloc == 0 && m->morebuf.sp - sizeof(Stktop) - argsize - 32 > gp->stackguard) {
+ if(reflectcall && m->morebuf.sp - sizeof(Stktop) - argsize - 32 > gp->stackguard) {
// special case: called from reflect.call (framesize==1)
// to call code with an arbitrary argument size,
// and we have enough space on the current stack.