Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2008-05-02 07:07:09


Author: igaztanaga
Date: 2008-05-02 07:07:08 EDT (Fri, 02 May 2008)
New Revision: 45019
URL: http://svn.boost.org/trac/boost/changeset/45019

Log:
Tickets #1883, #1862, #1709
Text files modified:
   trunk/boost/interprocess/allocators/allocator.hpp | 8 +++++---
   trunk/boost/interprocess/allocators/private_adaptive_pool.hpp | 7 +++++--
   trunk/boost/interprocess/allocators/private_node_allocator.hpp | 7 +++++--
   trunk/libs/interprocess/test/node_pool_test.hpp | 2 +-
   trunk/libs/intrusive/test/unordered_multiset_test.cpp | 2 +-
   5 files changed, 17 insertions(+), 9 deletions(-)

Modified: trunk/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/allocator.hpp 2008-05-02 07:07:08 EDT (Fri, 02 May 2008)
@@ -48,15 +48,17 @@
 template<class T, class SegmentManager>
 class allocator
 {
+ public:
+ //Segment manager
+ typedef SegmentManager segment_manager;
+ typedef typename SegmentManager::void_pointer void_pointer;
+
    /// @cond
    private:
 
    //Self type
    typedef allocator<T, SegmentManager> self_t;
 
- //Segment manager
- typedef SegmentManager segment_manager;
-
    //Pointer to void
    typedef typename segment_manager::void_pointer aux_pointer_t;
 

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-02 07:07:08 EDT (Fri, 02 May 2008)
@@ -55,10 +55,13 @@
    , SegmentManager
>
 {
+ public:
+ //Segment manager
+ typedef SegmentManager segment_manager;
+ typedef typename SegmentManager::void_pointer void_pointer;
+
    /// @cond
    private:
- typedef typename SegmentManager::void_pointer void_pointer;
- typedef SegmentManager segment_manager;
    typedef private_adaptive_pool_base
       < Version, T, SegmentManager, NodesPerChunk
       , MaxFreeChunks, OverheadPercent> self_t;

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-02 07:07:08 EDT (Fri, 02 May 2008)
@@ -62,10 +62,13 @@
    , SegmentManager
>
 {
+ public:
+ //Segment manager
+ typedef SegmentManager segment_manager;
+ typedef typename SegmentManager::void_pointer void_pointer;
+
    /// @cond
    private:
- typedef typename SegmentManager::void_pointer void_pointer;
- typedef SegmentManager segment_manager;
    typedef private_node_allocator_base
       < Version, T, SegmentManager, NodesPerChunk> self_t;
    typedef detail::private_node_pool

Modified: trunk/libs/interprocess/test/node_pool_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/node_pool_test.hpp (original)
+++ trunk/libs/interprocess/test/node_pool_test.hpp 2008-05-02 07:07:08 EDT (Fri, 02 May 2008)
@@ -136,7 +136,7 @@
    typedef boost::interprocess::test::test_node_pool<node_pool_t> test_node_pool_t;
    shared_memory_object::remove(test::get_process_id_name());
    {
- managed_shared_memory shm(create_only, test::get_process_id_name(), 16*1024);
+ managed_shared_memory shm(create_only, test::get_process_id_name(), 4*1024*sizeof(void*));
 
       typedef deleter<node_pool_t, segment_manager> deleter_t;
       typedef unique_ptr<node_pool_t, deleter_t> unique_ptr_t;

Modified: trunk/libs/intrusive/test/unordered_multiset_test.cpp
==============================================================================
--- trunk/libs/intrusive/test/unordered_multiset_test.cpp (original)
+++ trunk/libs/intrusive/test/unordered_multiset_test.cpp 2008-05-02 07:07:08 EDT (Fri, 02 May 2008)
@@ -199,7 +199,7 @@
          for (unsigned int j = 0; j < random_size; ++j)
             data[j].value_ = random_init[j];
          unordered_multiset_type testset_new(bucket_traits(single_bucket, 1));
- testset_new.insert(&data[0], &data[max]);
+ testset_new.insert(&data[0], &data[0]+max);
          testset_new.erase(testset_new.iterator_to(data[i]));
          BOOST_TEST (testset_new.size() == (max -1));
       }


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