Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2003-11-16 09:46:20


On 11/15/2003 10:36 PM, Philippe A. Bouchard wrote:
[snip]
> "on-the-fly" reference counting seems to be the ideal candidate for Java's
> mark-and-sweep garbage collector:
> http://www.cs.technion.ac.il/~erez/Papers/refcount.ps
>
> What do you think...?
I know "zip" about threading; so, I'm probably not the best person to
ask. However, I did scan pages 1-3 and it looks good to me. p. 3 says:

   when updating a pointer, a thread must know the previous value
   of the pointer slot being updated

I guess this means when <(T1,S1),R1> is changed to <(T1,S1),R2> where
(T1,S1) is a smart pointer,S1, with pointee, R1 in thread, T1, and
and it's updated to point to R2, then "must know the previous value"
means it must decrement RC(R1). If so, then this highlights a weakness
of the weighted RC (WRC) sheme. As mentioned, any decrement with WRC
requires synchronization. So maybe this "on-the-fly rc" (OTFRC) is the
way to go.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk