[MLton-user] out of memory

Adam Goode adam at spicenitz.org
Tue Jun 1 18:09:00 PDT 2010


On 06/01/2010 03:57 PM, Matthew Fluet wrote:
> On Tue, Jun 1, 2010 at 2:28 PM, Sean McLaughlin <seanmcl at gmail.com> wrote:
>> Hello,
>>
>>   Both solutions you proposed worked.  Oddly I think, may-page-heap true was
>> significantly faster than -drop-pass deepFlatten.
> 
> That is odd.  Paging the heap to disk is generally quite expensive (in
> your case, it requires writing and reading a >1GiB file).  It would
> also mean that your program isn't quite a worst-case scenario for
> DeepFlatten, since it was able to complete with just a little more
> heap space.  On the other hand, with the greater heap space, the rest
> of the compile needs fewer garbage collections.  It might also
> indicate that deep flatten did enough work to significantly improve
> the remainder of the compilation.
> 

It might also be that the OS is using the remaining 2GB of memory as an
efficient page cache. If the computation is fast enough, the data might
not hit disk at all.

Is there a 64-bit MLton for Mac OS? That is probably the best solution
for this issue.


Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
Url : http://mlton.org/pipermail/mlton-user/attachments/20100601/d67db39f/signature.pgp


More information about the MLton-user mailing list