Hi MLton developers,<br><br>I have a program that MLton compiles just fine without profiling turned on; however, when profiling is enabled via -profile {time,alloc,count}, MLton runs out of memory in the deepFlatten phase. I haven't yet tried, but I imagine disabling the deepFlatten pass will allow for compilation to succeed. Is there a better alternative? What would be the best way to debug the memory usage? I.e., what information can I gather that would be useful in debugging the issue?<br>
<br>Some initial information that might be helpful:<br><br>:: Machine is a macbook pro 2.8 Ghz with 4GB of memory running OS 10.6.5<br><br>:: mlton outputs "MLton 20100608 (built Tue Jun 8 13:10:24 EDT 2010 on <a href="http://fenrir.cs.rit.edu">fenrir.cs.rit.edu</a>)"<br>
<br>:: I'm using the 32bit version of MLton (though the same behavior was observed with the 64bit executable, it just chewed up a lot more memory)<br><br>:: A `wc -l *.sml` returns 43357<br><br>:: Successful command line is as follows:<br>
mlton -runtime 'gc-summary' -profile no -output athena-profile=no -verbose 2 athena.mlb > build-profile=no.txt 2>&1<br><br>:: Unsuccessful command line:<br>mlton -runtime 'gc-summary' -profile alloc -output athena-profile=alloc -verbose 2 athena.mlb > build-profile=alloc.txt 2>&1<br>
<br>:: Last few lines of build-profile=alloc.txt<br> ssa2Simplify starting<br> typeCheck starting<br> typeCheck finished in 0.32 + 0.00 (0% GC)<br> deepFlatten starting<br>Out of memory. Unable to allocate heap with 1,192,034,304 bytes.<br>
<br>That final heap size looks small doesn't it?<br><br>Thanks,<br>Nick<br>