[MLton-user] gcc memory exhaustion

Dan DuVarney duvarney at reactive-systems.com
Mon Apr 20 10:53:54 PDT 2009


Matthew Fluet wrote:
> On Sat, 18 Apr 2009, Dan DuVarney wrote:
>> I'm attempting to use SVN r7016 MLton/MinGW to compile a large program
>> with time-profiling enabled. MLton generates a 235MB .c source file
>> which gcc (3.4.5) chokes on (i.e., runs out ofmemory). I've saved the
>> source files and tried compiling the MLton-generated code without any
>> optimizations enabled, but haven't been able to successfully compile.
>> I'm using a Windows/XP machine with 3GB memory.
>
> Is this using the C codegen or the native codegen?  If it is using the
> native codegen (the default on an x86 platform), then there will be
> only one .c file that includes global and static data for the program
> (including profiling source location data).  That one file can't
> really be split into smaller pieces.  On the other hand, it is mostly
> static data, so I'd be suprised that gcc has difficulty with it.

Thanks for the help. I'm using native codegen, so it sounds like
splitting the file is not an option. The memory problem is probably due
to a bug in gcc, as there are number of open bugs in bugzilla
complaining about gcc running out of memory. I tried compiling with gcc
4.3.3 and it also runs out of memory.

-Dan

-- 
Dan DuVarney
Reactive Systems, Inc.           +1 (919) 324-3507 ext. 103
duvarney at reactive-systems.com    http://www.reactive-systems.com




More information about the MLton-user mailing list