[MLton] Crash fread(...) failed (only read 0) (Cannot allocate memory) during deepFlatten with MLton 20070826

Nicolas Bertolotti Nicolas.Bertolotti at mathworks.fr
Wed Apr 23 01:48:35 PDT 2008


> BTW, if you are just changing the runtime, you might find it useful to
> rebuild the compiler with '-keep o', which will leave all of the object
> files from the compiler around.  Then you can compile with
> 'mlton -output mlton-compile *.o' which will just link the object files
> with the new runtime.

Sure ... it may also be useful to update the Makefile in order to build the runtime as a shared library.

> I've previously suggested trying the 'hash-cons p' runtime option, that
> instructs the runtime to hash-cons every 1/p (major) garbage collections.
> This can reduce the live data by sharing data.  Of course, the
> hash-consing table requires some space, which is may be hard to come by in
> this situation.

Wow, I probably read your mail too quickly ...

I tried the option yesterday.


>
> Beyond that, there aren't any runtime or compiler options that will affect
> the memory usage of the deepFlatten pass.  Either disable the pass
> completely ('-drop-pass deepFlatten') or you will need to investigate
> algorithmic changes to the deepFlatten pass.
>
> -Matthew



More information about the MLton mailing list