Boost logo

Boost Users :

Subject: [Boost-users] allocate_shared and allocation size
From: Olivier Tristan (o.tristan_at_[hidden])
Date: 2012-12-18 06:42:21


Hi Guys,

What would be the best way to get the size required by the allocation of
a shared_ptr used when using allocate_shared ?

So far, it looks like to be something related to the sizeof
sp_counted_impl_pda< P, D, A >, but I would like to know the cleaner way
of getting this info.

The goal is to preallocate my pool with the right number of planned
shared_ptr in order to avoid allocation.(real time thread)

Thanks !

-- 
Olivier Tristan
uvi.net

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net