Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2008-05-23 18:37:12


Author: igaztanaga
Date: 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
New Revision: 45701
URL: http://svn.boost.org/trac/boost/changeset/45701

Log:
#1912: some copy edits on boost.intrusive
#1932: move semantics for shared objects
#1635: Incomplete include guard in boost/intrusive
Text files modified:
   trunk/boost/interprocess/allocators/adaptive_pool.hpp | 198 +++++++--------------------------------
   trunk/boost/interprocess/allocators/allocator.hpp | 10 +-
   trunk/boost/interprocess/allocators/cached_adaptive_pool.hpp | 68 ++++++------
   trunk/boost/interprocess/allocators/cached_node_allocator.hpp | 36 +++---
   trunk/boost/interprocess/allocators/node_allocator.hpp | 52 +++++-----
   trunk/boost/interprocess/allocators/private_adaptive_pool.hpp | 100 ++++++++++----------
   trunk/boost/interprocess/allocators/private_node_allocator.hpp | 76 ++++++--------
   7 files changed, 205 insertions(+), 335 deletions(-)

Modified: trunk/boost/interprocess/allocators/adaptive_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/adaptive_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/adaptive_pool.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -40,138 +40,18 @@
 /// @cond
 
 namespace detail{
-/*
-template < unsigned int Version
- , class T
- , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
- , unsigned char OverheadPercent
- >
-class adaptive_pool_base
- : public node_pool_allocation_impl
- < adaptive_pool_base
- < Version, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent>
- , Version
- , T
- , SegmentManager
- >
-{
- public:
- typedef typename SegmentManager::void_pointer void_pointer;
- typedef SegmentManager segment_manager;
- typedef adaptive_pool_base
- <Version, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> self_t;
- static const std::size_t SizeOfT = sizeof(detail::if_c<detail::is_same<T, void>::value, int, T>::type);
- typedef detail::shared_adaptive_node_pool
- < SegmentManager, SizeOfT, NodesPerChunk, MaxFreeChunks, OverheadPercent> node_pool_t;
- typedef typename detail::
- pointer_to_other<void_pointer, node_pool_t>::type node_pool_ptr;
-
- BOOST_STATIC_ASSERT((Version <=2));
-
- public:
- //-------
- typedef typename detail::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename detail::
- pointer_to_other<void_pointer, const T>::type const_pointer;
- typedef T value_type;
- typedef typename detail::add_reference
- <value_type>::type reference;
- typedef typename detail::add_reference
- <const value_type>::type const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
- typedef detail::version_type<adaptive_pool_base, Version> version;
- typedef transform_iterator
- < typename SegmentManager::
- multiallocation_iterator
- , detail::cast_functor <T> > multiallocation_iterator;
- typedef typename SegmentManager::
- multiallocation_chain multiallocation_chain;
-
- //!Obtains adaptive_pool_base from
- //!adaptive_pool_base
- template<class T2>
- struct rebind
- {
- typedef adaptive_pool_base<Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
- };
-
- /// @cond
- private:
- //!Not assignable from related adaptive_pool_base
- template<unsigned int Version2, class T2, class SegmentManager2, std::size_t N2, std::size_t F2, unsigned char O2>
- adaptive_pool_base& operator=
- (const adaptive_pool_base<Version2, T2, SegmentManager2, N2, F2, O2>&);
-
- //!Not assignable from other adaptive_pool_base
- adaptive_pool_base& operator=(const adaptive_pool_base&);
- /// @endcond
-
- public:
- //!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
- adaptive_pool_base(segment_manager *segment_mngr)
- : mp_node_pool(detail::get_or_create_node_pool<node_pool_t>(segment_mngr)) { }
-
- //!Copy constructor from other adaptive_pool_base. Increments the reference
- //!count of the associated node pool. Never throws
- adaptive_pool_base(const adaptive_pool_base &other)
- : mp_node_pool(other.get_node_pool())
- {
- mp_node_pool->inc_ref_count();
- }
-
- //!Copy constructor from related adaptive_pool_base. If not present, constructs
- //!a node pool. Increments the reference count of the associated node pool.
- //!Can throw boost::interprocess::bad_alloc
- template<class T2>
- adaptive_pool_base
- (const adaptive_pool_base<Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
- : mp_node_pool(detail::get_or_create_node_pool<node_pool_t>(other.get_segment_manager())) { }
-
- //!Destructor, removes node_pool_t from memory
- //!if its reference count reaches to zero. Never throws
- ~adaptive_pool_base()
- { detail::destroy_node_pool_if_last_link(detail::get_pointer(mp_node_pool)); }
-
- //!Returns a pointer to the node pool.
- //!Never throws
- node_pool_t* get_node_pool() const
- { return detail::get_pointer(mp_node_pool); }
-
- //!Returns the segment manager.
- //!Never throws
- segment_manager* get_segment_manager()const
- { return mp_node_pool->get_segment_manager(); }
-
- //!Swaps allocators. Does not throw. If each allocator is placed in a
- //!different memory segment, the result is undefined.
- friend void swap(self_t &alloc1, self_t &alloc2)
- { detail::do_swap(alloc1.mp_node_pool, alloc2.mp_node_pool); }
-
- /// @cond
- private:
- node_pool_ptr mp_node_pool;
- /// @endcond
-};
-*/
 
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class adaptive_pool_base
    : public node_pool_allocation_impl
    < adaptive_pool_base
- < Version, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent>
+ < Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent>
    , Version
    , T
    , SegmentManager
@@ -181,7 +61,7 @@
    typedef typename SegmentManager::void_pointer void_pointer;
    typedef SegmentManager segment_manager;
    typedef adaptive_pool_base
- <Version, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> self_t;
+ <Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> self_t;
 
    /// @cond
 
@@ -189,7 +69,7 @@
    struct node_pool
    {
       typedef detail::shared_adaptive_node_pool
- < SegmentManager, sizeof(T), NodesPerChunk, MaxFreeChunks, OverheadPercent> type;
+ < SegmentManager, sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> type;
 
       static type *get(void *p)
       { return static_cast<type*>(p); }
@@ -225,7 +105,7 @@
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool_base<Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool_base<Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    /// @cond
@@ -265,7 +145,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    adaptive_pool_base
- (const adaptive_pool_base<Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const adaptive_pool_base<Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : mp_node_pool(detail::get_or_create_node_pool<typename node_pool<0>::type>(other.get_segment_manager())) { }
 
    //!Destructor, removes node_pool_t from memory
@@ -310,8 +190,8 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
- , std::size_t MaxFreeChunks = 2
+ , std::size_t NodesPerBlock = 64
+ , std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class adaptive_pool_v1
@@ -319,19 +199,19 @@
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
 {
    public:
    typedef detail::adaptive_pool_base
- < 1, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 1, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    adaptive_pool_v1(SegmentManager *segment_mngr)
@@ -340,7 +220,7 @@
 
    template<class T2>
    adaptive_pool_v1
- (const adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 };
@@ -356,17 +236,17 @@
 //!
 //!This node allocator shares a segregated storage between all instances
 //!of adaptive_pool with equal sizeof(T) placed in the same segment
-//!group. NodesPerChunk is the number of nodes allocated at once when the allocator
-//!needs runs out of nodes. MaxFreeChunks is the maximum number of totally free chunks
-//!that the adaptive node pool will hold. The rest of the totally free chunks will be
+//!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)
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class adaptive_pool
@@ -375,8 +255,8 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
    /// @endcond
@@ -384,14 +264,14 @@
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::adaptive_pool_base
- < 2, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 2, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
    public:
    typedef detail::version_type<adaptive_pool, 2> version;
 
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    adaptive_pool(SegmentManager *segment_mngr)
@@ -400,7 +280,7 @@
 
    template<class T2>
    adaptive_pool
- (const adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 
@@ -423,7 +303,7 @@
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private:
@@ -452,7 +332,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    adaptive_pool
- (const adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other);
+ (const adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -478,9 +358,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -513,7 +393,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -522,11 +402,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -539,7 +419,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -552,7 +432,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -566,15 +446,15 @@
 
 //!Equality test for same type
 //!of adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: trunk/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/allocator.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -183,7 +183,7 @@
          (command, limit_size, preferred_size, received_size, detail::get_pointer(reuse));
    }
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -196,7 +196,7 @@
    }
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements)
    {
@@ -204,7 +204,7 @@
          (mp_mngr->allocate_many(elem_sizes, n_elements, sizeof(T)));
    }
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -219,7 +219,7 @@
    pointer allocate_one()
    { return this->allocate(1); }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -234,7 +234,7 @@
    void deallocate_one(const pointer &p)
    { return this->deallocate(p, 1); }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is

Modified: trunk/boost/interprocess/allocators/cached_adaptive_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/cached_adaptive_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/cached_adaptive_pool.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -38,8 +38,8 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
- , std::size_t MaxFreeChunks = 2
+ , std::size_t NodesPerBlock = 64
+ , std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class cached_adaptive_pool_v1
@@ -48,8 +48,8 @@
          , detail::shared_adaptive_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 1>
@@ -60,8 +60,8 @@
          , detail::shared_adaptive_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 1> base_t;
@@ -70,7 +70,7 @@
    struct rebind
    {
       typedef cached_adaptive_pool_v1
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    cached_adaptive_pool_v1(SegmentManager *segment_mngr,
@@ -81,7 +81,7 @@
    template<class T2>
    cached_adaptive_pool_v1
       (const cached_adaptive_pool_v1
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 };
@@ -100,17 +100,17 @@
 //!memory segment. But also caches some nodes privately to
 //!avoid some synchronization overhead.
 //!
-//!NodesPerChunk is the minimum number of nodes of nodes allocated at once when
-//!the allocator needs runs out of nodes. MaxFreeChunks is the maximum number of totally free chunks
-//!that the adaptive node pool will hold. The rest of the totally free chunks will be
+//!NodesPerBlock is the minimum number of nodes 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)
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class cached_adaptive_pool
@@ -120,8 +120,8 @@
          , detail::shared_adaptive_node_pool
             < SegmentManager
             , sizeof(typename detail::if_c<detail::is_same<T, void>::value, int, T>::type)
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 2>
@@ -135,8 +135,8 @@
          , detail::shared_adaptive_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 2> base_t;
@@ -148,7 +148,7 @@
    struct rebind
    {
       typedef cached_adaptive_pool
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    cached_adaptive_pool(SegmentManager *segment_mngr,
@@ -158,7 +158,7 @@
 
    template<class T2>
    cached_adaptive_pool
- (const cached_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const cached_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 
@@ -181,7 +181,7 @@
    template<class T2>
    struct rebind
    {
- typedef cached_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef cached_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private:
@@ -210,7 +210,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    cached_adaptive_pool
- (const cached_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other);
+ (const cached_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -236,9 +236,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -271,7 +271,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -280,11 +280,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -297,7 +297,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -310,7 +310,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -331,15 +331,15 @@
 
 //!Equality test for same type
 //!of cached_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, std::size_t OP> inline
-bool operator==(const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, std::size_t OP> inline
+bool operator==(const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of cached_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, std::size_t OP> inline
-bool operator!=(const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, std::size_t OP> inline
+bool operator!=(const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: trunk/boost/interprocess/allocators/cached_node_allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/cached_node_allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/cached_node_allocator.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -39,7 +39,7 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
+ , std::size_t NodesPerBlock = 64
>
 class cached_node_allocator_v1
    : public detail::cached_allocator_impl
@@ -47,7 +47,7 @@
          , detail::shared_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
+ , NodesPerBlock
>
          , 1>
 {
@@ -57,7 +57,7 @@
          , detail::shared_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
+ , NodesPerBlock
>
          , 1> base_t;
 
@@ -65,7 +65,7 @@
    struct rebind
    {
       typedef cached_node_allocator_v1
- <T2, SegmentManager, NodesPerChunk> other;
+ <T2, SegmentManager, NodesPerBlock> other;
    };
 
    cached_node_allocator_v1(SegmentManager *segment_mngr,
@@ -76,7 +76,7 @@
    template<class T2>
    cached_node_allocator_v1
       (const cached_node_allocator_v1
- <T2, SegmentManager, NodesPerChunk> &other)
+ <T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 };
@@ -87,7 +87,7 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class cached_node_allocator
    /// @cond
@@ -96,7 +96,7 @@
          , detail::shared_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
+ , NodesPerBlock
>
          , 2>
    /// @endcond
@@ -109,7 +109,7 @@
          , detail::shared_node_pool
             < SegmentManager
             , sizeof(T)
- , NodesPerChunk
+ , NodesPerBlock
>
          , 2> base_t;
 
@@ -119,7 +119,7 @@
    template<class T2>
    struct rebind
    {
- typedef cached_node_allocator<T2, SegmentManager, NodesPerChunk> other;
+ typedef cached_node_allocator<T2, SegmentManager, NodesPerBlock> other;
    };
 
    cached_node_allocator(SegmentManager *segment_mngr,
@@ -129,7 +129,7 @@
 
    template<class T2>
    cached_node_allocator
- (const cached_node_allocator<T2, SegmentManager, NodesPerChunk> &other)
+ (const cached_node_allocator<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 
@@ -181,7 +181,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    cached_node_allocator
- (const cached_node_allocator<T2, SegmentManager, NodesPerChunk> &other);
+ (const cached_node_allocator<T2, SegmentManager, NodesPerBlock> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -207,9 +207,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -242,7 +242,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -251,11 +251,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -268,7 +268,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -281,7 +281,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is

Modified: trunk/boost/interprocess/allocators/node_allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/node_allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/node_allocator.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -43,12 +43,12 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class node_allocator_base
    : public node_pool_allocation_impl
    < node_allocator_base
- < Version, T, SegmentManager, NodesPerChunk>
+ < Version, T, SegmentManager, NodesPerBlock>
    , Version
    , T
    , SegmentManager
@@ -58,7 +58,7 @@
    typedef typename SegmentManager::void_pointer void_pointer;
    typedef SegmentManager segment_manager;
    typedef node_allocator_base
- <Version, T, SegmentManager, NodesPerChunk> self_t;
+ <Version, T, SegmentManager, NodesPerBlock> self_t;
 
    /// @cond
 
@@ -66,7 +66,7 @@
    struct node_pool
    {
       typedef detail::shared_node_pool
- < SegmentManager, sizeof(T), NodesPerChunk> type;
+ < SegmentManager, sizeof(T), NodesPerBlock> type;
 
       static type *get(void *p)
       { return static_cast<type*>(p); }
@@ -102,7 +102,7 @@
    template<class T2>
    struct rebind
    {
- typedef node_allocator_base<Version, T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator_base<Version, T2, SegmentManager, NodesPerBlock> other;
    };
 
    /// @cond
@@ -136,7 +136,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    node_allocator_base
- (const node_allocator_base<Version, T2, SegmentManager, NodesPerChunk> &other)
+ (const node_allocator_base<Version, T2, SegmentManager, NodesPerBlock> &other)
       : mp_node_pool(detail::get_or_create_node_pool<typename node_pool<0>::type>(other.get_segment_manager())) { }
 
    //!Assignment from other node_allocator_base
@@ -189,24 +189,24 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
+ , std::size_t NodesPerBlock = 64
>
 class node_allocator_v1
    : public node_allocator_base
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
 {
    public:
    typedef detail::node_allocator_base
- < 1, T, SegmentManager, NodesPerChunk> base_t;
+ < 1, T, SegmentManager, NodesPerBlock> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef node_allocator_v1<T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator_v1<T2, SegmentManager, NodesPerBlock> other;
    };
 
    node_allocator_v1(SegmentManager *segment_mngr)
@@ -215,7 +215,7 @@
 
    template<class T2>
    node_allocator_v1
- (const node_allocator_v1<T2, SegmentManager, NodesPerChunk> &other)
+ (const node_allocator_v1<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 };
@@ -230,11 +230,11 @@
 //!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
-//!group. NodesPerChunk is the number of nodes allocated at once when the allocator
+//!group. NodesPerBlock is the number of nodes allocated at once when the allocator
 //!needs runs out of nodes
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class node_allocator
    /// @cond
@@ -242,21 +242,21 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
    /// @endcond
 {
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::node_allocator_base
- < 2, T, SegmentManager, NodesPerChunk> base_t;
+ < 2, T, SegmentManager, NodesPerBlock> base_t;
    public:
    typedef detail::version_type<node_allocator, 2> version;
 
    template<class T2>
    struct rebind
    {
- typedef node_allocator<T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator<T2, SegmentManager, NodesPerBlock> other;
    };
 
    node_allocator(SegmentManager *segment_mngr)
@@ -265,7 +265,7 @@
 
    template<class T2>
    node_allocator
- (const node_allocator<T2, SegmentManager, NodesPerChunk> &other)
+ (const node_allocator<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 
@@ -288,7 +288,7 @@
    template<class T2>
    struct rebind
    {
- typedef node_allocator<T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator<T2, SegmentManager, NodesPerBlock> other;
    };
 
    private:
@@ -317,7 +317,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    node_allocator
- (const node_allocator<T2, SegmentManager, NodesPerChunk> &other);
+ (const node_allocator<T2, SegmentManager, NodesPerBlock> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -343,9 +343,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -378,7 +378,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -387,11 +387,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -404,7 +404,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -417,7 +417,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is

Modified: trunk/boost/interprocess/allocators/private_adaptive_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/private_adaptive_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/private_adaptive_pool.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -42,14 +42,14 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class private_adaptive_pool_base
    : public node_pool_allocation_impl
- < private_adaptive_pool_base < Version, T, SegmentManager, NodesPerChunk
- , MaxFreeChunks, OverheadPercent>
+ < private_adaptive_pool_base < Version, T, SegmentManager, NodesPerBlock
+ , MaxFreeBlocks, OverheadPercent>
    , Version
    , T
    , SegmentManager
@@ -63,13 +63,13 @@
    /// @cond
    private:
    typedef private_adaptive_pool_base
- < Version, T, SegmentManager, NodesPerChunk
- , MaxFreeChunks, OverheadPercent> self_t;
+ < Version, T, SegmentManager, NodesPerBlock
+ , MaxFreeBlocks, OverheadPercent> self_t;
    typedef detail::private_adaptive_node_pool
       <SegmentManager
       , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
       , OverheadPercent
> node_pool_t;
 
@@ -103,7 +103,7 @@
    struct rebind
    {
       typedef private_adaptive_pool_base
- <Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    /// @cond
@@ -114,8 +114,8 @@
       typedef detail::private_adaptive_node_pool
       <SegmentManager
       , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
       , OverheadPercent
> type;
 
@@ -148,7 +148,7 @@
    template<class T2>
    private_adaptive_pool_base
       (const private_adaptive_pool_base
- <Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ <Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : m_node_pool(other.get_segment_manager())
    {}
 
@@ -176,21 +176,21 @@
 };
 
 //!Equality test for same type of private_adaptive_pool_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc2)
 { return &alloc1 == &alloc2; }
 
 //!Inequality test for same type of private_adaptive_pool_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc2)
 { return &alloc1 != &alloc2; }
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
- , std::size_t MaxFreeChunks = 2
+ , std::size_t NodesPerBlock = 64
+ , std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class private_adaptive_pool_v1
@@ -198,19 +198,19 @@
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
 {
    public:
    typedef detail::private_adaptive_pool_base
- < 1, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 1, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef private_adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef private_adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private_adaptive_pool_v1(SegmentManager *segment_mngr)
@@ -219,7 +219,7 @@
 
    template<class T2>
    private_adaptive_pool_v1
- (const private_adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const private_adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 };
@@ -234,17 +234,17 @@
 //!placing the allocator in shared memory, memory mapped-files, etc...
 //!This allocator has its own node pool.
 //!
-//!NodesPerChunk is the minimum number of nodes of nodes allocated at once when
-//!the allocator needs runs out of nodes. MaxFreeChunks is the maximum number of totally free chunks
-//!that the adaptive node pool will hold. The rest of the totally free chunks will be
+//!NodesPerBlock is the minimum number of nodes 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)
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class private_adaptive_pool
@@ -253,8 +253,8 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
    /// @endcond
@@ -262,7 +262,7 @@
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::private_adaptive_pool_base
- < 2, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 2, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
    public:
    typedef detail::version_type<private_adaptive_pool, 2> version;
 
@@ -270,7 +270,7 @@
    struct rebind
    {
       typedef private_adaptive_pool
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private_adaptive_pool(SegmentManager *segment_mngr)
@@ -279,7 +279,7 @@
 
    template<class T2>
    private_adaptive_pool
- (const private_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const private_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 
@@ -303,7 +303,7 @@
    struct rebind
    {
       typedef private_adaptive_pool
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private:
@@ -332,7 +332,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    private_adaptive_pool
- (const private_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other);
+ (const private_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -358,9 +358,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -393,7 +393,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -402,11 +402,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -419,7 +419,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -432,7 +432,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -446,15 +446,15 @@
 
 //!Equality test for same type
 //!of private_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of private_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: trunk/boost/interprocess/allocators/private_node_allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/private_node_allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/private_node_allocator.hpp 2008-05-23 18:37:10 EDT (Fri, 23 May 2008)
@@ -8,16 +8,6 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2008. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
 #ifndef BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
 #define BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
 
@@ -52,11 +42,11 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class private_node_allocator_base
    : public node_pool_allocation_impl
- < private_node_allocator_base < Version, T, SegmentManager, NodesPerChunk>
+ < private_node_allocator_base < Version, T, SegmentManager, NodesPerBlock>
    , Version
    , T
    , SegmentManager
@@ -70,11 +60,11 @@
    /// @cond
    private:
    typedef private_node_allocator_base
- < Version, T, SegmentManager, NodesPerChunk> self_t;
+ < Version, T, SegmentManager, NodesPerBlock> self_t;
    typedef detail::private_node_pool
       <SegmentManager
       , sizeof(T)
- , NodesPerChunk
+ , NodesPerBlock
> node_pool_t;
 
    BOOST_STATIC_ASSERT((Version <=2));
@@ -107,7 +97,7 @@
    struct rebind
    {
       typedef private_node_allocator_base
- <Version, T2, SegmentManager, NodesPerChunk> other;
+ <Version, T2, SegmentManager, NodesPerBlock> other;
    };
 
    /// @cond
@@ -117,7 +107,7 @@
       typedef detail::private_node_pool
       <SegmentManager
       , sizeof(T)
- , NodesPerChunk
+ , NodesPerBlock
> type;
 
       static type *get(void *p)
@@ -149,7 +139,7 @@
    template<class T2>
    private_node_allocator_base
       (const private_node_allocator_base
- <Version, T2, SegmentManager, NodesPerChunk> &other)
+ <Version, T2, SegmentManager, NodesPerBlock> &other)
       : m_node_pool(other.get_segment_manager())
    {}
 
@@ -190,24 +180,24 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
+ , std::size_t NodesPerBlock = 64
>
 class private_node_allocator_v1
    : public private_node_allocator_base
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
 {
    public:
    typedef detail::private_node_allocator_base
- < 1, T, SegmentManager, NodesPerChunk> base_t;
+ < 1, T, SegmentManager, NodesPerBlock> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef private_node_allocator_v1<T2, SegmentManager, NodesPerChunk> other;
+ typedef private_node_allocator_v1<T2, SegmentManager, NodesPerBlock> other;
    };
 
    private_node_allocator_v1(SegmentManager *segment_mngr)
@@ -216,7 +206,7 @@
 
    template<class T2>
    private_node_allocator_v1
- (const private_node_allocator_v1<T2, SegmentManager, NodesPerChunk> &other)
+ (const private_node_allocator_v1<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 };
@@ -229,11 +219,11 @@
 //!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 allocator has its own node pool. NodesPerChunk is the number of nodes allocated
+//!This allocator has its own node pool. NodesPerBlock is the number of nodes allocated
 //!at once when the allocator needs runs out of nodes
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class private_node_allocator
    /// @cond
@@ -241,14 +231,14 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
    /// @endcond
 {
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::private_node_allocator_base
- < 2, T, SegmentManager, NodesPerChunk> base_t;
+ < 2, T, SegmentManager, NodesPerBlock> base_t;
    public:
    typedef detail::version_type<private_node_allocator, 2> version;
 
@@ -256,7 +246,7 @@
    struct rebind
    {
       typedef private_node_allocator
- <T2, SegmentManager, NodesPerChunk> other;
+ <T2, SegmentManager, NodesPerBlock> other;
    };
 
    private_node_allocator(SegmentManager *segment_mngr)
@@ -265,7 +255,7 @@
 
    template<class T2>
    private_node_allocator
- (const private_node_allocator<T2, SegmentManager, NodesPerChunk> &other)
+ (const private_node_allocator<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 
@@ -289,7 +279,7 @@
    struct rebind
    {
       typedef private_node_allocator
- <T2, SegmentManager, NodesPerChunk> other;
+ <T2, SegmentManager, NodesPerBlock> other;
    };
 
    private:
@@ -318,7 +308,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    private_node_allocator
- (const private_node_allocator<T2, SegmentManager, NodesPerChunk> &other);
+ (const private_node_allocator<T2, SegmentManager, NodesPerBlock> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -344,9 +334,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -379,7 +369,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -388,11 +378,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -405,7 +395,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -418,7 +408,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -432,15 +422,15 @@
 
 //!Equality test for same type
 //!of private_node_allocator
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of private_node_allocator
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk