aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-09-15 12:32:31 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-09-15 12:32:31 +0000
commit7e56d668646e384a2c6cb9f903bdf2b47f31b129 (patch)
tree676cbfebbb629db4af055d56322e25c90f477b72 /libgo
parentf4720b94c49fa64aad75c309681712f0e94a5059 (diff)
downloadgcc-7e56d668646e384a2c6cb9f903bdf2b47f31b129.zip
gcc-7e56d668646e384a2c6cb9f903bdf2b47f31b129.tar.gz
gcc-7e56d668646e384a2c6cb9f903bdf2b47f31b129.tar.bz2
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 From-SVN: r227784
Diffstat (limited to 'libgo')
-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 662dd87..9d8c025 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