[MLton] GC on Cygwin/Vista
Matthew Fluet
fluet at tti-c.org
Fri Oct 12 20:59:17 PDT 2007
On Mon, 1 Oct 2007, Tom Murphy wrote:
> I just got a new computer with Windows Vista and I'm trying out MLton
> 20070826 on Cygwin there. Small programs work fine, but when I run out of
> memory and a mlton-compiled binary decides to page to disk, it crashes
> with (gc-messages on):
>
> [GC: Writing heap at 0x331d0000 of size 427,789,296 bytes to disk.]
> GetTempFileName failed with error 5
>
> I don't have any idea why GetTempFileName is failing since it seems to be
> called correctly. This is a pretty fresh insall with no funny business,
> yet, so I don't think it's a problem particular to my machine.
>
> Some notes:
> * I modified runtime/platform/windows.c to always use the same filename
> c:\temp\asdf. Then the program sometimes gets past this point, but
> subsequently crashes with a segfault. (This might be because I'm just
> replacing the runtime in the binary distribution with a runtime I built
> myself; I can't do a whole self-compile because mlton exhibits the same
> bug when trying to self-compile.)
> * It is failing on the first call to GetTempFileName.
> * I have turned off the ntsec option to Cygwin because it was causing
> other permissions problems, but it doesn't change the behavior here.
>
> Any tips?
The "@MLton use-mmap --" runtime option seems to be a cure-all for Cygwin
related ills. See:
http://mlton.org/pipermail/mlton-user/2007-September/001196.html
Note, you can pass "@MLton use-mmap" to the /usr/bin/mlton script if you
are getting crashes trying to compile programs.
More information about the MLton
mailing list