On Sat, Jan 10, 2004 at 02:28:38PM +0100, Leopold Toetsch wrote: > Luke Palmer <[EMAIL PROTECTED]> wrote: > > Leopold Toetsch writes: > >> It seems, that in that case we still need to walk the PMC arenas and > >> reset all live bits. OTOH when ARENA_DOD_FLAGS is on, this isn't too > >> expensive because it can be done my masking a full word worth of 8 PMCs > >> at once. So its still a lot faster then the eager case - hopefully. > >> > >> Or am I missing something? > > > I don't think you are. I would have thought that GC be the one to reset > > the live bits, but there was a lot of DOD that I didn't completely > > understand. > > GC is mostly independent of DOD and it doesn't look at PMCs. GC compacts > variable sized memory pools. > > I have applied now your patch with some minor cleanup. Funnily clearing > the live bits after an aborted lazy DOD run seems not to be necessary. > Either the test (t/pmc/timer_7) is bogus or I'm still missing something.
I'm seeing compile failures on FreeBSD now: src/dod.c: In function `clear_live_bits': src/dod.c:755: `cur_arena' undeclared (first use in this function) src/dod.c:755: (Each undeclared identifier is reported only once src/dod.c:755: for each function it appears in.) src/dod.c *** Error code 1 The appended patch cures it (and all tests pass) but I'm not sure if it is correct. Nicholas Clark Index: src/dod.c =================================================================== RCS file: /cvs/public/parrot/src/dod.c,v retrieving revision 1.80 diff -p -u -r1.80 dod.c --- src/dod.c 10 Jan 2004 13:47:50 -0000 1.80 +++ src/dod.c 10 Jan 2004 16:05:52 -0000 @@ -752,7 +752,7 @@ clear_live_bits(Parrot_Interp interprete } #else Buffer *b = arena->start_objects; - for (i = 0; i < cur_arena->used; i++) { + for (i = 0; i < arena->used; i++) { PObj_live_CLEAR(b); b = (Buffer *)((char *)b + object_size); }