Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2006-02-08 14:18:09


> Hopefully someone will correct me, but I don't think that shared_ptr
> can have a custom allocator to allocate the reference count in the
> shared memory.

If you want to store the reference count and the shared_ptr itself in
the shared memory so that the shared_ptr is a shared_ptr between
*processes*, I'm working on a boost::shmem::shared_ptr so that you can
store a shared_ptr in shared memory (and construct containers of
shared_ptr). The reference count would be allocated also in the same
segment. Obviously, since in shared memory I have some problems(the
deleter should be a template parameter, since we can't use virtual
functions, we need a parameter to know from where to allocate the
reference count, etc...) the interface will be a bit different. But you
will need to wait a bit ;-)

Regards,

Ion


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