Benjamin Goldberg <[EMAIL PROTECTED]> wrote: > Leopold Toetsch wrote: >> Benjamin Goldberg wrote: >> >>> If a PMC was found to be reachable through a non-refcounted variable, >>> then we set a flag saying so. At the end of DoD, every reachable >>> refcounted value which has the first flag set, but this other flag >>> not set, gets it's first flag cleared. >> >> I think I don't understand the "first & other flag".
Have it. Lets call this second flag: still_referenced_FLAG. Now above sentence reads: During the mark phase: If a PMC is reachable through a non refcounted it gets still_referenced_FLAG set. And then: If a PObj has the is_referenced_FLAG set but still_referenced_FLAG cleared then reset the is_referenced_FLAG. >> If there are any objects with a refcount live after a DOD run, we set >> again the interpreter->need_lazy_dod flag. > With your suggestion, the interpreter->need_lazy_dod would never get > unset until *all* refcounted objects get cleaned up. Yep, that was wrong. It should go: At the beginning of the DOD run, we reset interpreter->need_lazy_dod. At the end of the DOD run we do: If we find refcounted objects with a refcount of zero and the is_referenced_FLAG set, we set interpreter->need_lazy_dod. leo