File indexing completed on 2026-06-21 08:07:56
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 ">#
0019 #if defined(BOOST_HAS_PRAGMA_ONCE)
0020 # pragma once
0021 #endif
0022
0023 #include <boost/interprocess/detail/config_begin.hpp>
0024 #include <boost/interprocess/detail/workaround.hpp>
0025
0026 #include <boost/intrusive/slist.hpp>
0027 #include <boost/interprocess/detail/utilities.hpp>
0028 #include <boost/interprocess/allocators/detail/allocator_common.hpp>
0029 #include <boost/container/detail/node_pool_impl.hpp>
0030 #include <cstddef>
0031
0032
0033
0034
0035
0036 namespace boost {
0037 namespace interprocess {
0038 namespace ipcdetail {
0039
0040
0041
0042
0043
0044
0045
0046 template< class SegmentManager, std::size_t NodeSize, std::size_t NodesPerBlock >
0047 class private_node_pool
0048
0049 : public boost::container::dtl::
0050 private_node_pool_impl<typename SegmentManager::segment_manager_base_type>
0051 {
0052 typedef boost::container::dtl::private_node_pool_impl
0053 <typename SegmentManager::segment_manager_base_type> base_t;
0054
0055 private_node_pool();
0056 private_node_pool(const private_node_pool &);
0057 private_node_pool &operator=(const private_node_pool &);
0058
0059 public:
0060 typedef SegmentManager segment_manager;
0061 typedef typename base_t::size_type size_type;
0062
0063 static const size_type nodes_per_block = NodesPerBlock;
0064
0065 static const size_type nodes_per_chunk = NodesPerBlock;
0066
0067
0068 private_node_pool(segment_manager *segment_mngr)
0069 : base_t(segment_mngr, NodeSize, NodesPerBlock)
0070 {}
0071
0072
0073 segment_manager* get_segment_manager() const
0074 { return static_cast<segment_manager*>(base_t::get_segment_manager_base()); }
0075 };
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086 template< class SegmentManager
0087 , std::size_t NodeSize
0088 , std::size_t NodesPerBlock
0089 >
0090 class shared_node_pool
0091 : public ipcdetail::shared_pool_impl
0092 < private_node_pool
0093 <SegmentManager, NodeSize, NodesPerBlock>
0094 >
0095 {
0096 typedef ipcdetail::shared_pool_impl
0097 < private_node_pool
0098 <SegmentManager, NodeSize, NodesPerBlock>
0099 > base_t;
0100 public:
0101 shared_node_pool(SegmentManager *segment_mgnr)
0102 : base_t(segment_mgnr)
0103 {}
0104 };
0105
0106 }
0107 }
0108 }
0109
0110 #include <boost/interprocess/detail/config_end.hpp>
0111
0112 #endif