Warning, file /include/boost/interprocess/allocators/detail/node_pool.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_INTERPROCESS_DETAIL_NODE_POOL_HPP
0012 #define BOOST_INTERPROCESS_DETAIL_NODE_POOL_HPP
0013
0014 #ifndef BOOST_CONFIG_HPP
0015 # include <boost/config.hpp>
0016 #endif
0017 #
0018 #if defined(BOOST_HAS_PRAGMA_ONCE)
0019 # pragma once
0020 #endif
0021
0022 #include <boost/interprocess/detail/config_begin.hpp>
0023 #include <boost/interprocess/detail/workaround.hpp>
0024
0025 #include <boost/intrusive/slist.hpp>
0026 #include <boost/interprocess/detail/utilities.hpp>
0027 #include <boost/interprocess/allocators/detail/allocator_common.hpp>
0028 #include <boost/container/detail/node_pool_impl.hpp>
0029 #include <cstddef>
0030
0031
0032
0033
0034
0035 namespace boost {
0036 namespace interprocess {
0037 namespace ipcdetail {
0038
0039
0040
0041
0042
0043
0044
0045 template< class SegmentManager, std::size_t NodeSize, std::size_t NodesPerBlock >
0046 class private_node_pool
0047
0048 : public boost::container::dtl::
0049 private_node_pool_impl<typename SegmentManager::segment_manager_base_type>
0050 {
0051 typedef boost::container::dtl::private_node_pool_impl
0052 <typename SegmentManager::segment_manager_base_type> base_t;
0053
0054 private_node_pool();
0055 private_node_pool(const private_node_pool &);
0056 private_node_pool &operator=(const private_node_pool &);
0057
0058 public:
0059 typedef SegmentManager segment_manager;
0060 typedef typename base_t::size_type size_type;
0061
0062 static const size_type nodes_per_block = NodesPerBlock;
0063
0064 static const size_type nodes_per_chunk = NodesPerBlock;
0065
0066
0067 private_node_pool(segment_manager *segment_mngr)
0068 : base_t(segment_mngr, NodeSize, NodesPerBlock)
0069 {}
0070
0071
0072 segment_manager* get_segment_manager() const
0073 { return static_cast<segment_manager*>(base_t::get_segment_manager_base()); }
0074 };
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 template< class SegmentManager
0086 , std::size_t NodeSize
0087 , std::size_t NodesPerBlock
0088 >
0089 class shared_node_pool
0090 : public ipcdetail::shared_pool_impl
0091 < private_node_pool
0092 <SegmentManager, NodeSize, NodesPerBlock>
0093 >
0094 {
0095 typedef ipcdetail::shared_pool_impl
0096 < private_node_pool
0097 <SegmentManager, NodeSize, NodesPerBlock>
0098 > base_t;
0099 public:
0100 shared_node_pool(SegmentManager *segment_mgnr)
0101 : base_t(segment_mgnr)
0102 {}
0103 };
0104
0105 }
0106 }
0107 }
0108
0109 #include <boost/interprocess/detail/config_end.hpp>
0110
0111 #endif