http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59431
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #3 from Ian Lance Taylor <ian at airs dot com> --- > Yeah, I didn't think that would fix this problem, I was just hoping for more > consistent error messages--e.g., "out of memory" rather than "caught signal > while mallocing: 10". I've now looked a bit closer and found that runtime_SysAlloc is indeed failing. The problem seems to be documented behavior of mmap(2) in 32-bit processes on Solaris: The size requested is incremented by the 16 Kbytes for these pages and is then subject to rounding constraints. The con- straints are: o For 32-bit processes: If length > 4 Mbytes round to 4-Mbyte multiple elseif length > 512 Kbytes round to 512-Kbyte multiple else round to 64-Kbyte multiple E.g. for os/check, I find almost 50000 512-byte allocations, each of which costs 64 kB of virtual address space. This will quickly exhaust 4 GB, while not being a noticable problem for 64-bit processes. Rainer