On Mon, Dec 30, 2002 at 04:00:55PM -0800, Steve Fink wrote:
> =head1 Solution 3: Explicity root set augmentation
> 
> A final possible solution is to provide a mechanism to temporarily
> anchor an otherwise unanchored object to the root set. (eg, have an
> array of objects associated with the interpreter that are all
> considered to be part of the root set.) This has pretty much the same
> advantages and disadvantages of explicit neonate flag setting:
> 
>  + Simple
>  + Fast DOD
>  - Slow for unanchored temporaries
>  - Sometimes slow for anchored objects (depending on whether they need
>    to be temporarily anchored before the final anchoring)

What do you mean by slow here?

>  - Easy to forget to remove temporaries from the root set
>  - Easy to double-anchor objects and forget to remove the temporary
>    anchoring
>  - longjmp() can bypass the unanchoring

The temporary objects could be stored in a stack, which is popped when
leaving the current function (both with normal exits and longjmp).
This should make it a lot less likely to forget the unanchoring.

-- Jerome

Reply via email to