summaryrefslogtreecommitdiff
path: root/boost/interprocess/allocators/node_allocator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/allocators/node_allocator.hpp')
-rw-r--r--boost/interprocess/allocators/node_allocator.hpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/boost/interprocess/allocators/node_allocator.hpp b/boost/interprocess/allocators/node_allocator.hpp
index f1c3259d73..2c1fe566a3 100644
--- a/boost/interprocess/allocators/node_allocator.hpp
+++ b/boost/interprocess/allocators/node_allocator.hpp
@@ -34,7 +34,7 @@
#include <cstddef>
//!\file
-//!Describes node_allocator pooled shared memory STL compatible allocator
+//!Describes node_allocator pooled shared memory STL compatible allocator
namespace boost {
namespace interprocess {
@@ -98,11 +98,11 @@ class node_allocator_base
typedef boost::container::container_detail::transform_multiallocation_chain
<typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
- //!Obtains node_allocator_base from
+ //!Obtains node_allocator_base from
//!node_allocator_base
template<class T2>
struct rebind
- {
+ {
typedef node_allocator_base<Version, T2, SegmentManager, NodesPerBlock> other;
};
@@ -121,15 +121,15 @@ class node_allocator_base
//!Constructor from a segment manager. If not present, constructs a node
//!pool. Increments the reference count of the associated node pool.
//!Can throw boost::interprocess::bad_alloc
- node_allocator_base(segment_manager *segment_mngr)
+ node_allocator_base(segment_manager *segment_mngr)
: mp_node_pool(ipcdetail::get_or_create_node_pool<typename node_pool<0>::type>(segment_mngr)) { }
- //!Copy constructor from other node_allocator_base. Increments the reference
+ //!Copy constructor from other node_allocator_base. Increments the reference
//!count of the associated node pool. Never throws
- node_allocator_base(const node_allocator_base &other)
- : mp_node_pool(other.get_node_pool())
- {
- node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->inc_ref_count();
+ node_allocator_base(const node_allocator_base &other)
+ : mp_node_pool(other.get_node_pool())
+ {
+ node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->inc_ref_count();
}
//!Copy constructor from related node_allocator_base. If not present, constructs
@@ -150,7 +150,7 @@ class node_allocator_base
//!Destructor, removes node_pool_t from memory
//!if its reference count reaches to zero. Never throws
- ~node_allocator_base()
+ ~node_allocator_base()
{ ipcdetail::destroy_node_pool_if_last_link(node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))); }
//!Returns a pointer to the node pool.
@@ -177,14 +177,14 @@ class node_allocator_base
//!Equality test for same type
//!of node_allocator_base
template<unsigned int V, class T, class S, std::size_t NPC> inline
-bool operator==(const node_allocator_base<V, T, S, NPC> &alloc1,
+bool operator==(const node_allocator_base<V, T, S, NPC> &alloc1,
const node_allocator_base<V, T, S, NPC> &alloc2)
{ return alloc1.get_node_pool() == alloc2.get_node_pool(); }
//!Inequality test for same type
//!of node_allocator_base
template<unsigned int V, class T, class S, std::size_t NPC> inline
-bool operator!=(const node_allocator_base<V, T, S, NPC> &alloc1,
+bool operator!=(const node_allocator_base<V, T, S, NPC> &alloc1,
const node_allocator_base<V, T, S, NPC> &alloc2)
{ return alloc1.get_node_pool() != alloc2.get_node_pool(); }
@@ -206,11 +206,11 @@ class node_allocator_v1
template<class T2>
struct rebind
- {
+ {
typedef node_allocator_v1<T2, SegmentManager, NodesPerBlock> other;
};
- node_allocator_v1(SegmentManager *segment_mngr)
+ node_allocator_v1(SegmentManager *segment_mngr)
: base_t(segment_mngr)
{}
@@ -225,12 +225,12 @@ class node_allocator_v1
/// @endcond
-//!An STL node allocator that uses a segment manager as memory
+//!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 node_allocator with equal sizeof(T) placed in the same segment
+//!This node allocator shares a segregated storage between all instances
+//!of node_allocator 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
template < class T
@@ -256,11 +256,11 @@ class node_allocator
template<class T2>
struct rebind
- {
+ {
typedef node_allocator<T2, SegmentManager, NodesPerBlock> other;
};
- node_allocator(SegmentManager *segment_mngr)
+ node_allocator(SegmentManager *segment_mngr)
: base_t(segment_mngr)
{}
@@ -284,11 +284,11 @@ class node_allocator
typedef typename segment_manager::size_type size_type;
typedef typename segment_manager::difference_type difference_type;
- //!Obtains node_allocator from
+ //!Obtains node_allocator from
//!node_allocator
template<class T2>
struct rebind
- {
+ {
typedef node_allocator<T2, SegmentManager, NodesPerBlock> other;
};
@@ -299,7 +299,7 @@ class node_allocator
node_allocator& operator=
(const node_allocator<T2, SegmentManager2, N2>&);
- //!Not assignable from
+ //!Not assignable from
//!other node_allocator
//node_allocator& operator=(const node_allocator&);
@@ -309,7 +309,7 @@ class node_allocator
//!Can throw boost::interprocess::bad_alloc
node_allocator(segment_manager *segment_mngr);
- //!Copy constructor from other node_allocator. Increments the reference
+ //!Copy constructor from other node_allocator. Increments the reference
//!count of the associated node pool. Never throws
node_allocator(const node_allocator &other);
@@ -336,7 +336,7 @@ class node_allocator
//!Never throws
size_type max_size() const;
- //!Allocate memory for an array of count elements.
+ //!Allocate memory for an array of count elements.
//!Throws boost::interprocess::bad_alloc if there is no enough memory
pointer allocate(size_type count, cvoid_pointer hint = 0);
@@ -360,7 +360,7 @@ class node_allocator
//!Never throws
const_pointer address(const_reference value) const;
- //!Copy construct an object.
+ //!Copy construct an object.
//!Throws if T's copy constructor throws
void construct(const pointer &ptr, const_reference v);
@@ -375,7 +375,7 @@ class node_allocator
std::pair<pointer, bool>
allocation_command(boost::interprocess::allocation_type command,
- size_type limit_size,
+ size_type limit_size,
size_type preferred_size,
size_type &received_size, const pointer &reuse = 0);
@@ -433,13 +433,13 @@ class node_allocator
//!Equality test for same type
//!of node_allocator
template<class T, class S, std::size_t NPC> inline
-bool operator==(const node_allocator<T, S, NPC> &alloc1,
+bool operator==(const node_allocator<T, S, NPC> &alloc1,
const node_allocator<T, S, NPC> &alloc2);
//!Inequality test for same type
//!of node_allocator
template<class T, class S, std::size_t NPC> inline
-bool operator!=(const node_allocator<T, S, NPC> &alloc1,
+bool operator!=(const node_allocator<T, S, NPC> &alloc1,
const node_allocator<T, S, NPC> &alloc2);
#endif