Problem solved...

Stephen Weeks sweeks@intertrust.com
Sun, 4 Jun 2000 23:20:36 -0700 (PDT)


> Well, right now I have the GC-problem under Windows again -
> and not under Linux.
...
> I've added a message at every VirtualAlloc and VirtualFree.
> It seems to fail after the messages:
> Shrinking stack to size 262144
> unable to VirtualFree memory at 5ef0000
> 
> And by the way - the "unable to VirtualFree" address is hex,
> the other virtual alloc/free are decimal.
> 
> Do you have any ideas about what this is?

I was able to duplicate the error you saw.  I tried running it with
fixed-heap, and that failed as well.  As I don't have a decent windows
debugging environment I don't see how to help much more in the windows
world.

> Just a thought - maybe VirtualAlloc and VirtualFree
> cannot handle the large "gap" between the stack
> and the heap?

Maybe, but strange.

If you get desperate, more recent (internal) versions of MLton have a
modified runtime that allocates the stack within the heap.  Thus there 
are only two chunks of memory, fromspace and tospace.  I could let you 
have one of those to try out before the next MLton release.