Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

GCC memory issues

Hello:

I'm attempting to use GCC to compile some C code on my Mac Desktop Dual-Core Intel Xeon. It's a desktop running OSX 10.5.3, and has 16 GB of memory, and is running the latest Developer tools. The file I am trying to compile has about 60,000 lines, and is about 3 MB. When I try to compile it, I get memory errors that look like this:

cc1(1308) malloc: * mmap(size=437919744) failed (error code=12)
* error: can't allocate region
* set a breakpoint in malloc errorbreak to debug

cc1: out of memory allocating 437917200 bytes after a total of 0 bytes

I tried doing ulimit -s hard before compiling, but that didn't work either. Obviously, I know that GCC can create 64-bit code, but can GCC actually compile using 64-bits of memory? I'm surprised that I'm running out of memory. Are there any suggestions out there on how to deal with this?

2 x 3 GHz Dual-Core Intel Xeon, Mac OS X (10.5.3)

Posted on Jun 27, 2008 6:55 AM

Reply
2 replies

GCC memory issues

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.