Windows sucks

Henry Cejtin
Mon, 5 Jun 2000 13:49:57 -0500

I  suspect  that  it is NOT a bug in the code, but a failure in mapping it to
the evil Windows world.  Note, it is completely legal  to  mmap  a  chunk  of
memory  from A to B and to then unmap from C to B where C is strictly greater
than A (but less than B).  Thus, converting mmap to malloc and munmap to free
is NOT correct.

The call to smunmap in maybeShrinkStack (in gc.c) should be changed from
    smunmap(s->stackBottom + keep, s->stackSize - keep)
to a realloc call, like
    realloc(s->stackBottom, keep)
but  if the result isn't equal to s->stakBottom (which IS leagal for realloc)
then things have moved and you are dead.  Also there are other smunmap  calls
which seem to be doing the same thing.  I don't see an easy work around.