compiles asking for too much memory understood

Henry Cejtin henry@sourcelight.com
Tue, 18 Sep 2001 14:32:47 -0500


Ok,  I  found  the  reason for the problems with MLton using too much memory.
The problem is caused by the fact that GC_loadWorld()  sets  the  maxHeapSize
parameter in the GC_state to what ever it finds in the heap.  The reason that
Norman is having trouble is that I compiled the Red Hat 6.* RPMs on a machine
which has 1 gig of RAM.  Thus the compiler always thinks it can go up to that
size (modulo the slop).  I am amazed that  I  haven't  been  pimped  by  this
before  on my laptop which only has 128 meg of RAM and 128 meg of swap, but I
guess that I only tend to compile small things on it (although I do  remember
having trouble when I was compiling one thing which you guys found was really
using too much space).

Any way this clearly has to be fixed.  I vaguely recall some reason  why  you
(Stephen)  had some worry about trying to load the heap into less memory than
when you saved it.  Do you remember what the worry was?

My notion is to change things so that the normal heap parameters are  obeyed,
and if the saved heap doesn't fit, fail right away.