At 6:52 PM -0500 1/2/03, [EMAIL PROTECTED] wrote:
This doesn't work well at all with recursive calls into an interpreter, which is an issue. It also has some potentially large overhead as we need to do stuff between every opcode, whien generally we're going to be triggering runs when we're in the middle of an opcode.Here's a proposal w.r.t. adaptive GC (it's a variant of the NEW/BABY/DONTGCME/whatever flag): all buffers are created with this flag, but we only clear the flag on DOD runs when we _know_ it's safe (e.g. between opcodes); if we find we're getting low on resources, we queue a do-DOD-now event to be run next time we check for pending events. The plus is that there are no "what if we do DOD twice before this object gets rooted" issues; the minus is that we either have to fail allocations prematurely or give up on guarranteed resource limits. On the other hand, if someone _knows_ they're generating a lot of garbage in a loop (in C, not Parrot), they are always free to do a DOD run (if needed) when they know it's safe.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk