This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] update ggc_min_heapsize_heuristic()


On Sun, Apr 9, 2017 at 4:41 PM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> 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.

How does memory use change?

> What do you think?

Personally I think it's a bit late for GCC 7.

Richard.

> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]