Re[47]: [Gc]: GC + Windows Mobile + Threads + Patch for WINCE

Ivan Maidanski ivmai at
Thu Nov 5 11:46:00 PST 2009

"Boehm, Hans" <hans.boehm at> wrote:
> I just spent a bit of time debugging.  Unfortunately, in spite of both of us looking at it, the last patch to alloc.c was clearly broken, and I reverted it for now.
> The problem is that GC_stackbottom can easily refer to another thread.   As a result of that, we ended up with a humongous "stack size", which caused the collector to think garbage collections were very expensive, and should be avoided at essentially all cost.  That was bad.

Yes, it was bad. Thanks.

> Unfortunately, I think that leaves us with the original pre-patch heap growth on Windows, which would still be nice to track down.  But that's probably much harder for me to reproduce.

Yes, the problem is observed less frequent (a bit).

> As far as improving this code is concerned, I think we should probably just calculate total stack size once as stacks are pushed, and use that in min_bytes_allocd.  But I don't think that's a high priority.  Underestimating the stack size like we currently do should result in too frequent collections, which should reduce heap size.

Checked in this algorithm. (I think it's better to have stack size under/over-estimated than just a hard-coded value.)


More information about the Gc mailing list