The minimum size heuristic for the garbage collector's heap, before it
starts collecting, was last updated over ten years ago.
It currently has a hard upper limit of 128MB.
This is too low for current machines where 8GB of RAM is normal.
So, it seems to me, a new upper bound of 1GB would be appropriate.

Compile times of large C++ projects improve by over 10% due to this
change.

What do you think?
Thanks.


diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index b4c36fb0bbd4..91e121d7dafe 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -810,7 +810,7 @@ ggc_min_heapsize_heuristic (void)
   phys_kbytes = MIN (phys_kbytes, limit_kbytes);
 
   phys_kbytes = MAX (phys_kbytes, 4 * 1024);
-  phys_kbytes = MIN (phys_kbytes, 128 * 1024);
+  phys_kbytes = MIN (phys_kbytes, 1000 * 1024);
 
   return phys_kbytes;
 }

-- 
Markus

Reply via email to