https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78971

            Bug ID: 78971
           Summary: ggc-min-expand default value is probably obsolete
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aurelien at aurel32 dot net
  Target Milestone: ---

According to the manpage (and to the code) the default ggc-min-expand value
defaults to: "30% + 70% * (RAM/1GB) with an upper bound of 100% when RAM >=
1GB."

In 2017 it's quite common to have a machine with 1GB of RAM, especially on a
machine used to compile code. For example both the Raspberry Pi 2 and 3 have
1GB of RAM. I therefore think this default should be updated.

On 32-bit machines, it's getting more and more common to get a "virtual memory
exhausted: Cannot allocate memory" error and not be able to compile some code.
This is especially true on MIPS32 as the virtual memory space is limited to
2GB. A workaround is to use --ggc-min-expand=20, which shows the default value
is not optimal.

Reply via email to