[MLton] Writing memory to disk ...

Wesley W. Terpstra terpstra@gkec.informatik.tu-darmstadt.de
Wed, 24 May 2006 01:15:33 +0200


I notice that if you don't get enough address space to fit both the  
old heap and the new heap, MLton writes the heap to disk, then reads  
it back. Is this really a good idea? At least my /tmp is backed by  
RAM, not a disk. It's also the last thing I'd expect a program to do.  
Not to mention, I might not even have enough disk space! (and this  
case isn't checked)

Wouldn't it be better to just give up? Dumping >2GB to disk and  
reading it back sounds like a reason to print an error message to the  
effect of: "upgrade to a 64 bit processor and try again!" Or perhaps  
a (by default disabled) flag which can turn this on? eg: @MLton disk- 
backed -- ... The error message could also suggest to try this.