[MLton-user] CreateFile failed with error 80

Petersen, Leaf leaf.petersen at intel.com
Fri May 16 09:21:27 PDT 2008


Someone asked about the significance of the "CreateFile failed with
error 80" error message when running on cygwin a few days ago.  I
couldn't remember where I'd seen it before until I just ran into it
again.  

 

This seems to happen when you blow out your  heap on cygwin (or at
least, that's a possible cause).  In my case, if I limit the heap (e.g.
by passing the arguments @MLton max-heap 100m -- to the executable), I
get a more sensible error message.  See below for an example program
that exhibits this.

 

-leaf

 

$ cat test.sml

 

fun f (x : word, l : word list) : word list =

    if x = 0w0 then

      l

    else

      f (Word.+(x, 0w1), x::l)

 

val () = List.app (print o Word.toString) (f (0w1, []))

 

$ mlton test.sml

 

$ ./test

CreateFile failed with error 80

 

$ ./test @MLton max-heap 100m --

Out of memory with max heap size 104,857,600.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20080516/2420989c/attachment.htm


More information about the MLton-user mailing list