Tue, 28 Aug 2007 09:31:40 -0400, feeley wrote:
On 28-Aug-07, at 4:04 AM, Sven.Hartrumpf@FernUni-Hagen.de wrote:
Hi all.
Does anybody have any hints how to compile a large one-file program (10K - 100K lines) on a machine with only 3 GB RAM?
That's a pretty large program! Is this code generated automatically?
No, normal manually written code.
It is possible that an earlier version of gcc can deal with larger C files. I have never tried gcc 4.2.1, but Brad Lucier may be able to help you because he has experience with almost all versions of gcc since version 3.0.
Oh, yes. Your response made clear that the message below ("virtual ...") is not from gsc, but from gcc. Could this be made clearer in the output so that we can avoid dumb questions like mine? :-)
- gsc command:
gsc n.scm
virtual memory exhausted: Cannot allocate memory
memtime reports: 412.94 user, 20.03 system, 470.08 elapsed -- Max VSize = 2331356KB, Max RSS = 2001108KB
Which version of gsc? By default v4.0.0 uses the compile option ___USE_INLINE_JUMPS that generates tighter and faster code than earlier versions.
Yes, 4.0.0.
You'll get tighter code with (not inline). You'll get tighter code with (mostly-generic).
These two hints brought the RAM use down by a factor of 2. Thanks! Now I have a runnable program compiled by gsc.
Greetings Sven