Boost logo

Boost :

From: cppljevans_at_[hidden]
Date: 2003-10-10 19:29:22

On 10/10/2003 04:15 PM, Fernando Cacciola wrote:
> I can't read .tar files in XP.
> If you can add a .zip I can look at it.
I added a which contains the new_policied.cpp code as well
as a new test, smart_ptr.cpp, showing how to use with a policied smart
pointer. Hopefully it can be adapted for use with David Held's code.
Anyway, it highlights the memory advantages of the shifted_ptr method.
The only advantage is w.r.t. the number of vertices. As shown by
smart_ptr.cpp, the memory required is E*2*sizeof(void*) (where E =
the number of "Edges" [pointers] in the pointer graph) which is
the same as for hared_ptr), + V*(sizeof(vtbl*)+sizeof(deleter*)+
2*sizeof(refcount)) which, compared with that shown in,
shows an size advantage over shared_ptr of 1 sizeof(void*). The
uploaded code did not include room for the deleter or weak count, but
I added them in the above analysis.

Fernando, I had another problem with the preprocessor macros. If you
look at the code just uploaded, you'll note some duplication of
code. The 2 macros:


are almost the same. I tried creating another macro with the common
elements; however, it didn't work. Is there some way of doing
this to save duplicate coding?

Boost list run by bdawes at, gregod at, cpdaniel at, john at