Benjamin Goldberg <[EMAIL PROTECTED]> writes: > Actually, I meant generation set to MAX_INT, not 0. > > Marking pmcs as free happens at the end of DOD. Marking pmcs as live or > dead happens earlier. I was thinking of something like: > > foreach(pmc in all_pmcs) { ... > } > foreach(pmc in root set) { ... > } > trace the pmcs in the list of pmcs to be traced > foreach(pmc in all_pmcs) { ... > }
These are two complete sweeps over the allocated memory. But its necessary. > Actually, I just thought of a seriously cool idea. If the C stack > always grows up, or always grows down, then we can use the address of > the local variable holding the interpreter, as the generation number. > Thus, we can avoid changing the prototype of all our functions. Sortof > like how one write an alloca() library function. Cool idea. This way the generation is the depth of the call chain, and not the depth of calls with temporaries. A deeply nested DOD run will not very likely free any temporaries. This increases the need for DOD runs in the run-loop. > Except that generational_dod_helper is much simpler and faster -- it > doesn't mark anything as alive or free, it only adjusts the generation > of those pmcs that were created in C functions which we have since > returned from. Its still one full sweep. > The generation count doesn't *force* intermediate DOD-runs... or at > least, not a *full* DOD, anyway. But it needs intermediate sweeps. bye boe -- Juergen Boemmels [EMAIL PROTECTED] Fachbereich Physik Tel: ++49-(0)631-205-2817 Universitaet Kaiserslautern Fax: ++49-(0)631-205-3906 PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F 23 F6 C7 2F 85 93 DD 47