Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-01-13 01:27:01


From: Andy Glew <glew_at_[hidden]>
> > That doesn't force us to have an intrusive reference-count (unless I
> > misunderstand the meaning of "not available"). What it forces is some way of
> > getting to the count for existing objects which are already being counted.
> > You could store that association in a hash table.
> >
> > I have already been in communication with Greg about that possibility,
> > because twice colleagues of mine have made the mistake of initializing a
> > smart_ptr with a raw pointer to an object which is already being counted.
> > One of the engineers was senior.
>
> You can make the association with a hash table,
> but intrusiveness is one hell of a lot less expensive
> than hashing.

To be clear, solving Beman's design problem without being intrusive
does not require a hash table -- just a non-intrusive weak pointer
implementation like the one I described late last year.

> (Although... I'm the "MLP", Memory Level Parallelism, guy.
> In the MLP world, computation is free, cache missing memory
> accesses are all that cost, and parallel cache misses are okay.
> In that MLP world, the hash access isn't so bad, as long as
> there are no collision chains, no extra levels of indirection,
> etc. But, the hardware we program on will not be in that
> world for 8 years, if ever.)


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