[MLton-user] strange runtime error with mlton + cygwin

Matthew Fluet fluet at tti-c.org
Sat May 10 06:13:18 PDT 2008


On Tue, 6 May 2008, Sami Evangelista wrote:
> i have some problems running a program compiled with mlton.
> this one (sometimes) crash outputting the following error:
>
> CreateFile failed with error 80

It seems that that error message arises from the portion of the runtime 
that attempts to page the heap to disk in order to allocate a larger heap. 
(<src>/runtime/platform/windows.c in the MLton sources.)

Looking at microsoft docs, it seems that error 80 is 'the file exists', 
which shouldn't happen, as a unique temporary file name is generated.

Running your program with '@MLton use-mmap --' will instruct the runtime 
to use Cygwin's emulation of mmap, rather than directly using Win32 memory 
management functions.  Sometimes that behaves better; in particular, may 
succeed in allocating larger heaps without paging the current heap.

There are list readers with more experience with the Cygwin port, and 
perhaps they can offer other insight.




More information about the MLton-user mailing list