This is the mail archive of the gcc-help@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: Can GCC use more than 4G while compiling ?


Ian Lance Taylor wrote:
Tomas Kalibera <kalibera@cs.purdue.edu> writes:

What is the exact error message?  Are all the compiler binaries 64-bit
executables?

- "virtual memory exhausted: Cannot allocate memory"

OK, that means that a call to mmap using MAP_ANONYMOUS returned
MAP_FAILED with errno set to ENOMEM. I see from the mmap man page
that that can happen when the process's has reached the maximum number
of mappings. It seems at least possible that you are running out of
maps before you are running out of memory. On a GNU/Linux system you
can see the maximum map count with "/sbin/sysctl vm.max_map_count".
You can change that value using /sbin/sysctl -w.

Thanks! This helped.


I assume that it might also help to override GGC_QUIRE_SIZE (now it's set in ggc-page.c to 256, when mmap is used). But I did not check.

Tomas


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