Subject: Re: [boost] [shifted_ptr] Documentation
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-04-10 19:13:14
On 4/9/2011 3:48 AM, Peter Dimov wrote:
> Phil Bouchard wrote:
>> And an overview is available here:
>> Please let me know if anything isn't clear enough.
> It's not clear how shifted_ptr detects cyclic blocks of memory with no
> coding overhead. The methods with which I'm familiar require (a) the
> ability to enumerate all pointer subobjects in an object and (b) the
> ability to zero these pointers so as to break the cycles. Without some
> sort of registry that tracks all pointer instances (overhead on
> construction/destruction) (a) requires cooperation from the pointee,
> which shifted_ptr does not seem to demand.
> It's also not clear how cyclic structures are detected immediately.
> Doing this typically either requires a scan (collection cycle) on every
> pointer destruction, or some sort of housekeeping on each construction
> and copy.
> It is also not clear how well does the cyclic collector work when, in
> parallel, other threads create and destroy references to the objects
> being currently scanned.
We clearly see in the following diagram the mechanism behind the
detection of cyclic structures:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk