This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] update ggc_min_heapsize_heuristic()
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Sun, 9 Apr 2017 20:23:33 +0200
- Subject: Re: [RFA] update ggc_min_heapsize_heuristic()
- Authentication-results: sourceware.org; auth=none
- References: <20170409144125.GA10606@x4>
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