All~

> >>The clone functions could be redone like:
> >>  Parrot_do_dod_run(); // get free headers if possible
> >>  Parrot_block_DOD/GC();
> >>  do_clone
> >>  Parrot_unblock_DOD/GC
> >>This would also be faster, because there are no DOD runs during clone
> >>(which wouldn't yield more free headers anyway).
>
> > But wouldn't that force a DOD run on every clone? Normally, DOD should
> > be extremely rare compared to clones.

You could instead have a function Parrot_do_at_most_N_DOD/GC(int n), that
would never do a DOD run if it was passed 0.  Do 1 if it was passed one, 2
for 2 etc, and do DOD runs whenever if passed -1.

Thus the code would be

Parrot_do_at_most_N_DOD/GC(1);
do_clone
Parrot_unblock_DOD/GC(-1);

This would allow it to do one DOD run if it realized that it needed it part
way through the clone, but would never do more.  This could also allow more
flexible control of the GC if one wanted it.

Matt
----
"Computer Science is merely the post-Turing decline of Formal Systems
Theory"
-???

Reply via email to