Boost logo

Boost :

Subject: Re: [boost] [shifted_ptr] Documentation
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-04-09 06:48:04


Phil Bouchard wrote:
> And an overview is available here:
> http://www.fornux.com/personal/philippe/devel/shifted_ptr/libs/smart_ptr/doc/overview.html
>
> 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.


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