David T. Lewis wrote:
fprintf(stderr, "oldLimit=%p\ndelta=%d\nnewSize=%d\nnewDelta=%d\n");
oldLimit=0x80562b8 delta=-1077506096 newSize=0 newDelta=423027548 squeak: /tmp/squeak-svn/platforms/unix/vm/sqUnixMemory.c:175: uxGrowMemoryBy: Assertion `newDelta >= 0' failed.
Does it help?
Yes. I don't think newSize is supposed to be 0 here.
int newSize= min(valign(oldLimit - heap + delta), heapLimit); int newDelta= newSize - heapSize;
I'm not sure what is wrong, but apparently it's in the expression "min(valign(oldLimit - heap + delta), heapLimit)".
Could be a CSE bug. Considering that min(a,b) is usually defined as "a < b ? a : b" or so, a compiler might do something with the valign(...) expression. I would try to move the expression out of there and see if that helps.
Cheers, - Andreas