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

Ivan Maidanski ivmai at
Mon Nov 2 00:28:18 PST 2009

A week ago I wrote:
> Hi!
> "Boehm, Hans" <hans.boehm at> wrote:
> > > Hans -
> > > 1. the patch (attached) itself seems to look good/useful, right?
> > It looks like a marginal improvement to me.  I would have guessed that it might sometimes make the problem slightly worse, since it may increase the collectors idea of how much stack space it's scanning, especially since gctest is deeply recursive in one or two places.  If you want to check in the patch, fine.  But I think that if we want to really improve matters we should at least take the number of threads into consideration.

I could implement the following estimate alg:
1. calculate average stack size on every push_all_stacks;
2. maintain global nthreads (inc/dec'ed on register/unregister my thread);
3. in min_bytes_allocd(): stack_size=(nthreads-1)*avr_stack_size+((&dummy) - GC_stackbottom).

Points to refine (if the alg would be applied):
1. Should this remain or be removed?: if (stack_size < 10000) stack_size = 10000;
2. Should min_bytes_allocd() still be call only once per GC?

> >  We clearly have another problem, which I don't yet understand.
> I think completely the same (I'll check it in later (after fixing the major problem) - just to treat the multi-threaded case running in the single-threaded mode the same as a single-threaded case.

Already checked in. Results in the folk complains...

> ...


More information about the Gc mailing list