Namespaces | Functions
pool_allocator.hpp File Reference

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>
Include dependency graph for pool_allocator.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...
 

Detailed Description

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.

Author
Martin Pecka SPDX-License-Identifier: BSD-3-Clause SPDX-FileCopyrightText: Czech Technical University in Prague

Definition in file pool_allocator.hpp.



cras_cpp_common
Author(s): Martin Pecka
autogenerated on Mon Jun 17 2024 02:48:57