]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: Ignore stack sizes when deciding when to GC.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 15 Sep 2015 12:33:22 +0000 (12:33 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 15 Sep 2015 12:33:22 +0000 (12:33 +0000)
    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: r227786

libgo/runtime/mgc0.c

index b5a39d962a6c6d9d5957303e4337bea7c42bb81f..4af6c3460d5f10dbcb6bb5919ec02a68ca092e20 100644 (file)
@@ -2110,7 +2110,7 @@ gc(struct gc_args *args)
                runtime_notesleep(&work.alldone);
 
        cachestats();
-       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 = t4;