http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
--- Comment #58 from Dongsheng Song <dongsheng.song at gmail dot com> 2011-04-10 04:32:23 UTC --- (In reply to comment #57) > (In reply to comment #56) > > What works for me on Cygwin, and so may well also work for anyone using > > MSYS, > > is setting the heap_chunk_in_mb registry parameter to some value in the > > range > > 1024 - 1536. I use 1024 myself and that gives me sufficient headroom to > > link > > libgcj dll, which is huge; if it works for that, it's likely to help with wx > > dll as well. > > > > http://cygwin.com/cygwin-ug-net/setup-maxmem.html > > I don't think so. Because I observed ld.exe use memory over 1.7GB, so link wx > monolithic library require use more memory than 32 bit OS limit. For cross > compile under Linux, link wx can use near 3G memory, it still failed. > > Then link wx require 4G or more memory, maybe someone can try use 64bit linker > to build single huge monolithic library, tell us the max memory ld used. I test on 64bit Linux VM, after ld running 6 CPU hours, use 4728MB memory, still not finished, so I think there maybe have potential infinite loop and memory leaks when link many object files. I don't know this is GCC bug, or ld bug, or both ? http://sourceware.org/bugzilla/show_bug.cgi?id=12658 ld running 6 hours cpu time, use 4.6GB memory: VmPeak: 4776608 kB VmSize: 4734656 kB VmLck: 0 kB VmHWM: 3020260 kB VmRSS: 2982304 kB VmData: 4728000 kB VmStk: 100 kB VmExe: 912 kB VmLib: 1504 kB VmPTE: 9232 kB Threads: 1 Cpu(s): 7.9%us, 11.5%sy, 0.0%ni, 44.4%id, 33.3%wa, 0.2%hi, 2.7%si, 0.0%st Mem: 3095296k total, 3073516k used, 21780k free, 16k buffers Swap: 7811064k total, 3905532k used, 3905532k free, 9484k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1110 dongshen 20 0 4623m 2.8g 196 D 49 96.1 358:15.13 ld