Re: Can GCC use more than 4G while compiling ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tomas Kalibera <kalibera@xxxxxxxxxxxxx> 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.


> I'm now trying my luck with
> 
> "--param ggc-min-expand=0 --param ggc-min-heapsize=4096"
> 
> Compilation is now by orders of magnitude slower, it's been already
> compiling the single file for 6 hours, I don't know how far it got.

Those options are just going to make the compiler run much slower,
they are unlikely to reduce the maximum amount of allocated memory.


> OK, and there is not any special option needed when compiling the gcc
> compiler ?

No.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux