summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-15 12:32:59 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-15 12:32:59 +0000
commita6a07f150e9e2254921f317c94961d55109d1860 (patch)
treee7b822402766396bb8f62ca7bde41c591643c79f
parent2cafbfbbba7349494d180a0c38bdff00b2fb6dff (diff)
downloadgcc-a6a07f150e9e2254921f317c94961d55109d1860.tar.gz
runtime: Ignore stack sizes when deciding when to GC.
This restores https://golang.org/cl/6081043 which was lost accidentally when updating a new version of libgo in https://golang.org/cl/22440043 . Reviewed-on: https://go-review.googlesource.com/14569 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@227785 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgo/runtime/mgc0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/runtime/mgc0.c b/libgo/runtime/mgc0.c
index 662dd875762..9d8c025e7c2 100644
--- a/libgo/runtime/mgc0.c
+++ b/libgo/runtime/mgc0.c
@@ -2280,7 +2280,7 @@ gc(struct gc_args *args)
heap0 = mstats.next_gc*100/(gcpercent+100);
// conservatively set next_gc to high value assuming that everything is live
// concurrent/lazy sweep will reduce this number while discovering new garbage
- mstats.next_gc = mstats.heap_alloc+mstats.heap_alloc*gcpercent/100;
+ mstats.next_gc = mstats.heap_alloc+(mstats.heap_alloc-runtime_stacks_sys)*gcpercent/100;
t4 = runtime_nanotime();
mstats.last_gc = runtime_unixnanotime(); // must be Unix time to make sense to user