[MLton] cygwoes
Stephen Weeks
MLton@mlton.org
Thu, 29 Sep 2005 08:06:07 -0700
> Any word on the cygwin problem?
I made a little progress. The way I usually debug stuff on Cygwin is
by cross compiling the regressions. I don't see the signal B error
that you do. Rather, I see
VirtualFree release failed
Hopefully they are related, although who knows.
MLton has two different ways of grabbing memory from the OS on Cygwin:
Virtual{Alloc,Free} or (the Cygwin-emulated) mmap. In the past,
Virtual{Alloc,Free} has been more stable and gave access to more
memory, so we made it the default. Perhaps that is no longer true.
We have a runtime flag, use-mmap, which forces the runtime to use
mmap. I am able to get all of our regressions to pass on Cygwin,
provided that I run them with @MLton use-mmap --.
As a stopgap, you could cross-compile your program with
-runtime use-mmap
to force the executable to use mmap. You might even try a full
bootstrap with use-mmap, possibly even tweaking GC_init in gc.c to set
MLton_Platform_CygwinUseMmap = TRUE;
You could also try experiments with Virtual{Alloc,Free} by compiling
the runtime with DEBUG_MEM = TRUE in platform.h. There are a couple
of other DEBUG_* flags in gc.c that might shed some light:
DEBUG_RESIZING comes to mind.
> I'm willing to try to fix this if someone can give me a tip on what it
> might be. Or is the release right around the corner?
The release has been right around the corner for over a month, the
delay being due only to the Cygwin problem. It would be great if you
could fix it. MLton might even be able to release!