Helper for allocating boost::shared_ptr instances in a boost shared pool. This should be useful if you publish shared_ptr messages and want to save some time during allocation of the new messages. The default pool size is 32 messages. Note that when publishing messages containing arrays, these functions only handle allocation of the message itself. Allocation of the array elements is done via the allocator specified in the message type. More...
#include <boost/make_shared.hpp>
#include <boost/pool/pool_alloc.hpp>
Go to the source code of this file.
Namespaces | |
cras | |
Functions | |
template<typename T , class... Args> | |
::boost::shared_ptr< T > | cras::make_shared_from_fast_pool (Args &&... args) |
Make a shared instance of an object from Boost fast pool (suitable for e.g. elements of a std::list or single object allocations). More... | |
template<typename T , class... Args> | |
::boost::shared_ptr< T > | cras::make_shared_from_pool (Args &&... args) |
Make a shared instance of an object from Boost pool (suitable for e.g. elements of a std::vector or allocations of multiple objects at once). More... | |
Helper for allocating boost::shared_ptr instances in a boost shared pool. This should be useful if you publish shared_ptr messages and want to save some time during allocation of the new messages. The default pool size is 32 messages. Note that when publishing messages containing arrays, these functions only handle allocation of the message itself. Allocation of the array elements is done via the allocator specified in the message type.
Definition in file pool_allocator.hpp.