Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > Singleton Reference

An STL node allocator that uses a segment manager as memory source. More...

#include <interprocess_fwd.hpp>

Inheritance diagram for boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >:
Collaboration diagram for boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >:

Classes

struct  rebind
 

Public Types

typedef
boost::interprocess::version_type
< adaptive_pool, 2 > 
version
 
typedef
SegmentManager::void_pointer 
void_pointer
 
typedef SegmentManager segment_manager
 
typedef adaptive_pool_base
< Version, T, SegmentManager,
NodesPerBlock, MaxFreeBlocks,
OverheadPercent > 
self_t
 
typedef
boost::intrusive::pointer_traits
< void_pointer >::template
rebind_pointer< T >::type 
pointer
 
typedef
boost::intrusive::pointer_traits
< void_pointer >::template
rebind_pointer< const T >
::type 
const_pointer
 
typedef T value_type
 
typedef
ipcdetail::add_reference
< value_type >::type 
reference
 
typedef
ipcdetail::add_reference
< const value_type >::type 
const_reference
 
typedef segment_manager::size_type size_type
 
typedef
segment_manager::difference_type 
difference_type
 
typedef
boost::container::container_detail::transform_multiallocation_chain
< typename
SegmentManager::multiallocation_chain,
T
multiallocation_chain
 

Public Member Functions

 adaptive_pool (SegmentManager *segment_mngr)
 
template<class T2 >
 adaptive_pool (const adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > &other)
 
 BOOST_STATIC_ASSERT ((Version<=2))
 
void * get_node_pool () const
 Returns a pointer to the node pool. More...
 
segment_managerget_segment_manager () const
 Returns the segment manager. More...
 

Detailed Description

template<class T, class SegmentManager, std::size_t NodesPerBlock, std::size_t MaxFreeBlocks, unsigned char OverheadPercent>
singleton boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >

An STL node allocator that uses a segment manager as memory source.

The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc...

This node allocator shares a segregated storage between all instances of adaptive_pool with equal sizeof(T) placed in the same segment group. NodesPerBlock is the number of nodes allocated at once when the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks that the adaptive node pool will hold. The rest of the totally free blocks will be deallocated with the segment manager.

OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator: (memory usable for nodes / total memory allocated from the segment manager)

Member Typedef Documentation

typedef boost::intrusive:: pointer_traits<void_pointer>::template rebind_pointer<const T>::type boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::const_pointer
inherited
typedef ipcdetail::add_reference<const value_type>::type boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::const_reference
inherited
typedef segment_manager::difference_type boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::difference_type
inherited
typedef boost::container::container_detail::transform_multiallocation_chain<typename SegmentManager::multiallocation_chain, T> boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::multiallocation_chain
inherited
typedef boost::intrusive:: pointer_traits<void_pointer>::template rebind_pointer<T>::type boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::pointer
inherited
typedef ipcdetail::add_reference<value_type>::type boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::reference
inherited
typedef SegmentManager boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::segment_manager
inherited
typedef adaptive_pool_base<Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::self_t
inherited
typedef segment_manager::size_type boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::size_type
inherited
typedef T boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::value_type
inherited
template<class T, class SegmentManager, std::size_t NodesPerBlock, std::size_t MaxFreeBlocks, unsigned char OverheadPercent>
typedef boost::interprocess::version_type<adaptive_pool, 2> boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::version
typedef SegmentManager::void_pointer boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::void_pointer
inherited

Constructor & Destructor Documentation

template<class T, class SegmentManager, std::size_t NodesPerBlock, std::size_t MaxFreeBlocks, unsigned char OverheadPercent>
boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::adaptive_pool ( SegmentManager *  segment_mngr)
inline
template<class T, class SegmentManager, std::size_t NodesPerBlock, std::size_t MaxFreeBlocks, unsigned char OverheadPercent>
template<class T2 >
boost::interprocess::adaptive_pool< T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::adaptive_pool ( const adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > &  other)
inline

Member Function Documentation

boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::BOOST_STATIC_ASSERT ( (Version<=2)  )
inherited
void* boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::get_node_pool ( ) const
inlineinherited

Returns a pointer to the node pool.

Never throws

segment_manager* boost::interprocess::ipcdetail::adaptive_pool_base< Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent >::get_segment_manager ( ) const
inlineinherited

Returns the segment manager.

Never throws


The documentation for this singleton was generated from the following file: