Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54118 - in sandbox/monotonic: boost/monotonic libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-19 19:51:01


Author: cschladetsch
Date: 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
New Revision: 54118
URL: http://svn.boost.org/trac/boost/changeset/54118

Log:
added more tests

Added:
   sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h (contents, props changed)
Text files modified:
   sandbox/monotonic/boost/monotonic/allocator.hpp | 4
   sandbox/monotonic/boost/monotonic/config.hpp | 4
   sandbox/monotonic/boost/monotonic/fixed_storage.hpp | 26 ++++
   sandbox/monotonic/boost/monotonic/storage.hpp | 12 +
   sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp | 224 +++++++++++++++++++++------------------
   sandbox/monotonic/libs/monotonic/test/main.cpp | 2
   sandbox/monotonic/libs/monotonic/test/monotonic.sln | 1
   sandbox/monotonic/libs/monotonic/test/monotonic.vcproj | 21 ++-
   8 files changed, 174 insertions(+), 120 deletions(-)

Modified: sandbox/monotonic/boost/monotonic/allocator.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/allocator.hpp (original)
+++ sandbox/monotonic/boost/monotonic/allocator.hpp 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -50,8 +50,10 @@
                         allocator() throw()
                                 : Parent(boost::monotonic::get_storage()) { }
 
- private:
+ public:
+ //private:
                         template <class Storage> struct local;
+
                         allocator(storage_base &store) throw()
                                 : Parent(store) { }
 

Modified: sandbox/monotonic/boost/monotonic/config.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/config.hpp (original)
+++ sandbox/monotonic/boost/monotonic/config.hpp 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -14,9 +14,9 @@
                 {
                         enum
                         {
- InlineSize = 8*1024, ///< buffer that is inline with the storage
+ InlineSize = 32*1024, ///< buffer that is inline with the storage
                                 MinHeapIncrement = 32*1024*1024, ///< the smallest new chunk-size for heap storage
- StaticInlineSize = 64*1024, ///< inline size for a global store. this goes into your BSS
+ StaticInlineSize = 1*1024*1024, ///< inline size for a global store. this goes into your BSS
                                 StaticMinHeapIncrement = 32*1024*1024,
                         };
                 };

Modified: sandbox/monotonic/boost/monotonic/fixed_storage.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/fixed_storage.hpp (original)
+++ sandbox/monotonic/boost/monotonic/fixed_storage.hpp 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -12,6 +12,8 @@
 #include <boost/monotonic/exceptions.hpp>
 #include <boost/monotonic/storage_base.hpp>
 
+//#define BOOST_MONOTONIC_FIXED_EARLY_OUT
+
 namespace boost
 {
         namespace monotonic
@@ -24,6 +26,12 @@
 
                 private:
                         Buffer buffer; ///< the storage
+#ifdef BOOST_MONOTONIC_FIXED_EARLY_OUT
+ /// if `full` is true, buffer has reached its capacity; used for early-out on allocation.
+ /// this maybe should be removed, because although it may speed up allocation
+ /// a little when the buffer is full, it also slows it down a little when it is not
+ bool full;
+#endif
                         size_t cursor; ///< pointer to current index within storage for next allocation
 #ifndef NDEBUG
                         size_t num_allocations;
@@ -31,6 +39,9 @@
                 public:
                         fixed_storage()
                                 : cursor(0)
+#ifdef BOOST_MONOTONIC_FIXED_EARLY_OUT
+ , full(false)
+#endif
 #ifndef NDEBUG
                                 , num_allocations(0)
 #endif
@@ -52,6 +63,9 @@
                         void reset()
                         {
                                 cursor = 0;
+#ifdef BOOST_MONOTONIC_FIXED_EARLY_OUT
+ full = false;
+#endif
 #ifndef NDEBUG
                                 num_allocations = 0;
 #endif
@@ -71,15 +85,25 @@
                                 cursor = c;
                         }
 
+ // testing performance against a fixed-size alignment
+ BOOST_STATIC_CONSTANT(size_t, alignment = 16);
+
                         /// allocate storage, given alignment requirement
- void *allocate(size_t num_bytes, size_t alignment)
+ void *allocate(size_t num_bytes, size_t /*alignment*/)
                         {
+#ifdef BOOST_MONOTONIC_FIXED_EARLY_OUT
+ if (full)
+ return 0;
+#endif
                                 size_t extra = cursor & (alignment - 1);
                                 if (extra > 0)
                                         extra = alignment - extra;
                                 size_t required = num_bytes + extra;
                                 if (cursor + required > InlineSize)
                                 {
+#ifdef BOOST_MONOTONIC_FIXED_EARLY_OUT
+ full = InlineSize - cursor < 16;
+#endif
                                         return 0;
                                 }
 #ifndef NDEBUG

Modified: sandbox/monotonic/boost/monotonic/storage.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/storage.hpp (original)
+++ sandbox/monotonic/boost/monotonic/storage.hpp 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -7,6 +7,7 @@
 #define BOOST_MONOTONIC_STORAGE_H
 
 #include <algorithm>
+//#include <boost/monotonic/allocator.hpp>
 #include <boost/monotonic/fixed_storage.hpp>
 
 namespace boost
@@ -82,15 +83,17 @@
                                         return A.remaining() < B.remaining();
                                 }
                         };
- typedef std::vector<Link, Al> Chain; // maintained a priority-queue
+ typedef std::vector<Link > Chain; // maintained a priority-queue
+ typedef fixed_storage<8*1024> ChainStorage; // local storage for the chain
 
                 private:
                         fixed_storage<InlineSize> fixed; // the inline fixed-sized storage which may be on the stack
+ //ChainStorage chain_storage; // use a seperate inline storage for the chains.
                         Chain chain; // heap-based storage
                         Allocator alloc; // allocator for heap-based storage
 
                 public:
- storage()
+ storage()// : chain(chain_storage)
                         {
                         }
                         storage(Allocator const &A)
@@ -169,6 +172,11 @@
                                 return count;
                         }
 
+ size_t num_links() const
+ {
+ return chain.size();
+ }
+
                 private:
                         void AddLink(size_t size)
                         {

Added: sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/test/AllocatorTypes.h 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -0,0 +1,87 @@
+// (C) 2009 Christian Schladetsch
+//
+// 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)
+
+// the documentation is at https://svn.boost.org/svn/boost/sandbox/monotonic/libs/monotonic/doc/index.html
+
+// the sandbox is at https://svn.boost.org/svn/boost/sandbox/monotonic/
+
+#pragma once
+
+#include <memory>
+#include <boost/pool/pool_alloc.hpp>
+#undef max
+#undef min
+#include <boost/monotonic/allocator.hpp>
+#include <tbb/tbb_allocator.h>
+
+struct Type
+{
+ enum Value
+ {
+ None = 0,
+ Standard = 1,
+ FastPool = 2,
+ Pool = 4,
+ Monotonic = 8,
+ TBB = 16,
+ Google = 32,
+ All = 0xffffffff,
+ };
+ unsigned flags;
+ Type(unsigned bits = All) : flags(bits) { }
+ bool Includes(unsigned bit) const { return (flags & bit) != 0; }
+ void Exclude(unsigned bit) { flags &= ~bit; }
+ std::string ToString() const;
+};
+
+struct Location
+{
+ enum { Heap, Stack };
+};
+
+template <size_t Num, class Ty>
+struct Allocator;
+
+template <class Ty>
+struct Allocator<Type::Standard, Ty> : std::allocator<Ty> { };
+
+template <class Ty>
+struct Allocator<Type::FastPool, Ty> : boost::fast_pool_allocator<Ty
+ , boost::default_user_allocator_new_delete
+ , boost::details::pool::null_mutex> { };
+
+template <class Ty>
+struct Allocator<Type::Pool, Ty> : boost::pool_allocator<Ty
+ , boost::default_user_allocator_new_delete
+ , boost::details::pool::null_mutex> { };
+
+template <class Ty>
+struct Allocator<Type::Monotonic, Ty> : boost::monotonic::allocator<Ty> { };
+
+template <class Ty>
+struct Allocator<Type::TBB, Ty> : tbb::tbb_allocator<Ty> { };
+
+template <class Alloc, class T>
+struct Rebind
+{
+ typedef typename Alloc::template rebind<T>::other type;
+};
+
+struct Unaligned
+{
+ char c[5];
+ Unaligned() { }
+ Unaligned(char C)
+ {
+ c[2] = C;
+ }
+};
+
+inline bool operator<(Unaligned const &A, Unaligned const &B)
+{
+ return A.c[2] < B.c[2];
+}
+
+//EOF

Modified: sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -10,64 +10,39 @@
 #include <iostream>
 #include <iomanip>
 #include <numeric>
+#include <algorithm>
 
 #include <vector>
 #include <list>
 #include <map>
 #include <set>
+#include <bitset>
+#include <string>
 
-#include <boost/pool/pool_alloc.hpp>
-#undef max
-#undef min
-#include <boost/monotonic/allocator.hpp>
-#include <boost/monotonic/local.hpp>
-
-
-#include <tbb/tbb_allocator.h>
 #include <boost/timer.hpp>
+#include <boost/monotonic/local.hpp>
 
-
+#include "./AllocatorTypes.h"
 
 using namespace std;
 using namespace boost;
 
-struct Unaligned
-{
- int num;
- char c;
- Unaligned() : num(0), c(0) { }
- Unaligned(char C) : num(0), c(C) { }
-};
-
-bool operator<(Unaligned const &A, Unaligned const &B)
-{
- return A.c < B.c;
-}
-
-template <class Alloc, class T>
-struct Rebind
-{
- typedef typename Alloc::template rebind<T>::other type;
-};
-
-struct thrash_pool
+struct test_vector_accumulate
 {
         template <class Alloc>
         int test(Alloc alloc, size_t length) const
         {
- std::vector<int, typename Rebind<Alloc, int>::type> vector;
- vector.resize(length*rand()/RAND_MAX);
+ std::vector<int, typename Rebind<Alloc, int>::type> vector(length*rand()/RAND_MAX);
                 return accumulate(vector.begin(), vector.end(), 0);
         }
 };
 
-struct thrash_pool_sort
+struct test_vector_random_sort
 {
         template <class Alloc>
         int test(Alloc alloc, size_t length) const
         {
- std::vector<int, typename Rebind<Alloc, int>::type> vector;
- vector.resize(length*rand()/RAND_MAX);
+ std::vector<int, typename Rebind<Alloc, int>::type> vector(length*rand()/RAND_MAX);
                 generate_n(back_inserter(vector), length, rand);
                 sort(vector.begin(), vector.end());
                 return 0;
@@ -86,24 +61,22 @@
         }
 };
 
-struct thrash_pool_iter
+struct test_vector_accumulate_unaligned
 {
         template <class Alloc>
         int test(Alloc alloc, size_t length) const
         {
- std::vector<Unaligned, typename Rebind<Alloc, Unaligned>::type> vector;
- vector.resize(length);
+ std::vector<Unaligned, typename Rebind<Alloc, Unaligned>::type> vector(length);
                 int total = 0;
                 BOOST_FOREACH(Unaligned const &val, vector)
                 {
- total += val.c;
+ total += val.c[2];
                 }
                 return total;
         }
 };
 
-
-struct thrash_pool_map_list_unaligned
+struct test_map_list
 {
         template <class Alloc>
         int test(Alloc alloc, size_t length) const
@@ -123,45 +96,38 @@
         }
 };
 
-struct thrash_pool_map_vector_unaligned
+template <class Map>
+int test_map_vector_impl(size_t length)
 {
- template <class Alloc>
- int test(Alloc alloc, size_t length) const
+ Map map;
+ size_t mod = length/10;
+ for (size_t n = 0; n < length; ++n)
         {
- std::map<int
- , std::vector<Unaligned, typename Rebind<Alloc, Unaligned>::type>
- , std::less<int>
- , typename Rebind<Alloc, int>::type
- > map;
- size_t mod = length/10;
- for (size_t n = 0; n < length; ++n)
- {
- int random = rand() % mod;
- map[random].push_back(n);
- }
- return 0;
+ int random = rand() % mod;
+ map[random].push_back(n);
         }
-};
+ return 0;
+}
 
-struct test_dupe_list
+template <class Ty>
+struct test_map_vector
 {
         template <class Alloc>
- int test(Alloc alloc, size_t count) const
+ int test(Alloc, size_t length) const
         {
- typedef std::list<int, typename Rebind<Alloc, int>::type> List;
- List list;
- fill_n(back_inserter(list), count, 42);
- List dupe = list;
- return dupe.size();
+ return test_map_vector_impl<std::map<int
+ , std::vector<Ty, typename Rebind<Alloc, Ty>::type>
+ , std::less<int>
+ , typename Rebind<Alloc, int>::type> >(length);
         }
 };
 
-struct test_dupe_list_unaligned
+struct test_dupe_list
 {
         template <class Alloc>
         int test(Alloc alloc, size_t count) const
         {
- typedef std::list<Unaligned, typename Rebind<Alloc, Unaligned>::type> List;
+ typedef std::list<int, typename Rebind<Alloc, int>::type> List;
                 List list;
                 fill_n(back_inserter(list), count, 42);
                 List dupe = list;
@@ -202,6 +168,56 @@
         }
 };
 
+template <class Container>
+int bubble_sort(Container &cont)
+{
+ bool swapped;
+ do
+ {
+ swapped = false;
+ typename Container::iterator A = cont.begin(), B = --cont.end();
+ typename Container::iterator C = A;
+ for (++C, --B; A != B; ++A, ++C)
+ {
+ if (*C < *A)
+ {
+ std::swap(*A, *C);
+ swapped = true;
+ }
+ }
+ }
+ while (swapped);
+ return 0;
+}
+
+template <class Ty>
+struct test_sort_list
+{
+ template <class Alloc>
+ int test(Alloc alloc, size_t count) const
+ {
+ std::list<Ty, typename Rebind<Alloc, Ty>::type> list;
+ for (size_t n = 0; n < count; ++n)
+ list.push_back(count - n);
+ list.sort();
+ return 0;
+ }
+};
+
+template <class Ty>
+struct test_sort_vector
+{
+ template <class Alloc>
+ int test(Alloc, size_t count) const
+ {
+ std::vector<Ty, typename Rebind<Alloc, Ty>::type> vector(count);
+ for (size_t n = 0; n < count; ++n)
+ vector[n] = count - n;
+ sort(vector.begin(), vector.end());
+ return 0;
+ }
+};
+
 struct PoolResult
 {
         double pool_elapsed;
@@ -212,43 +228,39 @@
         double tbb_elapsed;
         PoolResult()
         {
- tbb_elapsed = pool_elapsed = fast_pool_elapsed = mono_elapsed = local_mono_elapsed = std_elapsed = -1;
+ tbb_elapsed = pool_elapsed = fast_pool_elapsed = mono_elapsed = local_mono_elapsed = std_elapsed = 0;
         }
 };
 
 typedef std::map<size_t /*count*/, PoolResult> PoolResults;
 
 template <class Fun>
-PoolResult compare_memory_pool(size_t count, size_t length, Fun fun)
+PoolResult run_test(size_t count, size_t length, Fun fun, Type types)
 {
- typedef boost::fast_pool_allocator<int
- , boost::default_user_allocator_new_delete
- , boost::details::pool::null_mutex>
- fast_pool_alloc;
- typedef boost::pool_allocator<int
- , boost::default_user_allocator_new_delete
- , boost::details::pool::null_mutex>
- pool_alloc;
- typedef tbb::tbb_allocator<int> tbb_allocator;
- typedef monotonic::allocator<int> mono_alloc;
- typedef std::allocator<int > std_alloc;
+ typedef Allocator<Type::FastPool, void> fast_pool_alloc;
+ typedef Allocator<Type::Pool, void> pool_alloc;
+ typedef Allocator<Type::Monotonic, void> mono_alloc;
+ typedef Allocator<Type::TBB, void> tbb_alloc;
+ typedef Allocator<Type::Standard, void> std_alloc;
 
         PoolResult result;
 
         // test tbb_allocator
+ if (types.Includes(Type::TBB))
         {
                 srand(42);
                 boost::timer timer;
                 for (size_t n = 0; n < count; ++n)
                 {
                         {
- fun.test(tbb_allocator(), length);
+ fun.test(tbb_alloc(), length);
                         }
                 }
                 result.tbb_elapsed = timer.elapsed();
         }
 
         // test boost::fast_pool_allocator
+ if (types.Includes(Type::FastPool))
         {
                 srand(42);
                 boost::timer timer;
@@ -265,6 +277,7 @@
         }
 
         // test boost::pool_allocator
+ if (types.Includes(Type::Pool))
         {
                 srand(42);
                 boost::timer timer;
@@ -281,6 +294,7 @@
         }
 
         // test monotonic
+ if (types.Includes(Type::Monotonic))
         {
                 srand(42);
                 boost::timer timer;
@@ -295,9 +309,10 @@
         }
 
         // test local monotonic
+ if (types.Includes(Type::Monotonic))
         {
                 srand(42);
- monotonic::local<> storage;
+ monotonic::local<monotonic::storage<100000> > storage;
                 boost::timer timer;
                 for (size_t n = 0; n < count; ++n)
                 {
@@ -310,6 +325,7 @@
         }
 
         // test std
+ if (types.Includes(Type::Standard))
         {
                 srand(42);
                 boost::timer timer;
@@ -328,27 +344,29 @@
 }
 
 template <class Fun>
-PoolResults compare_memory_pool(size_t count, size_t max_length, size_t num_iterations, const char *title, Fun fun)
+PoolResults run_tests(size_t count, size_t max_length, size_t num_iterations, const char *title, Fun fun, Type types = Type::All)
 {
         cout << title << ": reps=" << count << ", len=" << max_length << ", steps=" << num_iterations;
         PoolResults results;
         for (size_t length = 10; length < max_length; length += max_length/num_iterations)
         {
- results[length] = compare_memory_pool(count, length, fun);
+ results[length] = run_test(count, length, fun, types);
         }
         cout << endl;
         return results;
 }
 
-void PrintResults(PoolResults const &results)
+void print(PoolResults const &results)
 {
- size_t w = 8;
- cout << setw(6) << "length" << setw(w) << "tbb" << setw(w) << "fastp" << setw(w) << "pool" << setw(w) << "std" << setw(w) << "mono" << setw(w) /*<< "local" << setw(w)*/ << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << endl;
+ size_t w = 6;
+ //cout << setw(4) << "len" << setw(w) << "tbb" << setw(w) << "fastp" << setw(w) << "pool" << setw(w) << "std" << setw(w) << "mono" << setw(w) << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << endl;
+ cout << setw(4) << "len" << setw(w) << "fastp" << setw(w) << "pool" << setw(w) << "std" << setw(w) << "tbb" << setw(w) << "mono" << setw(w) << "local" << setw(w) << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << setw(w) << "tbb/l" << endl;
         cout << setw(0) << "------------------------------------------------------------------------------" << endl;
         BOOST_FOREACH(PoolResults::value_type const &iter, results)
         {
                 PoolResult const &result = iter.second;
- cout << setw(6) << iter.first << setprecision(3) << setw(w) << result.tbb_elapsed << setw(w) << result.fast_pool_elapsed << setw(w) << result.pool_elapsed << setw(w) << result.std_elapsed << setw(w) << result.mono_elapsed /*<< setw(w) << result.local_mono_elapsed*/ << setw(w) << 100.*result.fast_pool_elapsed/result.mono_elapsed << "%" << setw(w) << 100.*result.pool_elapsed/result.mono_elapsed << "%" << setw(w) << 100.*result.std_elapsed/result.mono_elapsed << "%" << setw(w) << 100.*result.tbb_elapsed/result.mono_elapsed << "%" <<endl;
+ //cout << setw(4) << iter.first << setprecision(3) << setw(w) << result.tbb_elapsed << setw(w) << result.fast_pool_elapsed << setw(w) << result.pool_elapsed << setw(w) << result.std_elapsed << setw(w) << result.mono_elapsed << setw(w) << result.fast_pool_elapsed/result.mono_elapsed << setw(w) << result.pool_elapsed/result.mono_elapsed << setw(w) << result.std_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.mono_elapsed <<endl;
+ cout << setw(4) << iter.first << setprecision(4) << setw(w) << result.fast_pool_elapsed << setw(w) << result.pool_elapsed << setw(w) << result.std_elapsed << setw(w) << result.tbb_elapsed << setw(w) << result.mono_elapsed << setw(w) << result.local_mono_elapsed << setw(w) << setprecision(3) << result.fast_pool_elapsed/result.mono_elapsed << setw(w) << result.pool_elapsed/result.mono_elapsed << setw(w) << result.std_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.local_mono_elapsed << endl;
         }
         cout << endl;
 }
@@ -356,24 +374,23 @@
 int main()
 {
         boost::timer timer;
- PrintResults(compare_memory_pool(500, 500, 10, "thrash_pool_map_vector_unaligned", thrash_pool_map_vector_unaligned()));
- PrintResults(compare_memory_pool(100, 1000, 10, "thrash_pool_sort_list_int", thrash_pool_sort_list_int()));
+ Type test_map_vector_types;
+ test_map_vector_types.Exclude(Type::FastPool);
+
+ print(run_tests(50, 200, 5, "set_vector", test_set_vector()));
+ print(run_tests(500, 200, 10, "map_vector<int>", test_map_vector<int>(), test_map_vector_types));
+ print(run_tests(500, 200, 10, "sort_list<int>", test_sort_list<int>()));
+ print(run_tests(2000, 2000, 10, "sort_vector<int>", test_sort_vector<int>()));
+
+ print(run_tests(500, 2000, 10, "dupe_list", test_dupe_list()));
+ print(run_tests(1000, 10000, 10, "dupe_vector", test_dupe_vector()));
+ print(run_tests(50000, 2000, 10, "vector_accumulate", test_vector_accumulate()));
+ print(run_tests(1000, 1000, 10, "vector_random_sort", test_vector_random_sort()));
+
+ //PrintResults(compare_memory_pool(50000, 2000, 10, "vector_accumulate_unaligned", test_vector_accumulate_unaligned()));
+ //PrintResults(compare_memory_pool(100, 1000, 10, "map_vector<int>", test_map_vector<int>()));
+ //PrintResults(compare_memory_pool(100, 1000, 10, "map_vector<Unaligned>", test_map_vector<Unaligned>()));
 
-#ifdef WIN32
- // boost::fast_pool seems bad at this test with MSVC, so do it less.
- // this will result in less accurate results, but that doesnt matter because monotonic is orders of magnitudes faster
- // than fast_pool here...
- PrintResults(compare_memory_pool(10, 1000, 5, "test_set_vector", test_set_vector()));
-#else
- PrintResults(compare_memory_pool(500, 1000, 10, "test_set_vector", test_set_vector()));
-#endif
-
- PrintResults(compare_memory_pool(500, 2000, 10, "test_dupe_list", test_dupe_list()));
- PrintResults(compare_memory_pool(500, 2000, 10, "test_dupe_vector", test_dupe_vector()));
- PrintResults(compare_memory_pool(50000, 2000, 10, "thrash_pool", thrash_pool()));
- PrintResults(compare_memory_pool(50000, 2000, 10, "thrash_pool_iter", thrash_pool_iter()));
- PrintResults(compare_memory_pool(1000, 1000, 10, "thrash_pool_sort", thrash_pool_sort()));
- PrintResults(compare_memory_pool(1000, 2000, 10, "thrash_pool_map_list_unaligned", thrash_pool_map_list_unaligned()));
         cout << "tests completed in " << setprecision(2) << timer.elapsed() << "s" << endl;
 
         return 0;
@@ -383,7 +400,6 @@
 {
         namespace monotonic
         {
- // temp. hax to create global storage
                 static_storage_base<> default_static_storage;
                 storage_base *static_storage = &default_static_storage;
         }

Modified: sandbox/monotonic/libs/monotonic/test/main.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/main.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/main.cpp 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -382,7 +382,7 @@
 
         //test_chained_storage();
         //test_map_list_heap_stack();
- compare_memory_pool();
+ compare();
         //test_mono_map();
         //test_mono_map();
         //test_static_storage();

Modified: sandbox/monotonic/libs/monotonic/test/monotonic.sln
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/monotonic.sln (original)
+++ sandbox/monotonic/libs/monotonic/test/monotonic.sln 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -16,7 +16,6 @@
                 {5688980A-015B-4C7D-8D8D-F5894205FACE}.Release|Win32.ActiveCfg = Release|Win32
                 {5688980A-015B-4C7D-8D8D-F5894205FACE}.Release|Win32.Build.0 = Release|Win32
                 {470832FD-33D6-4F31-AD06-BB7838371077}.Debug|Win32.ActiveCfg = Debug|Win32
- {470832FD-33D6-4F31-AD06-BB7838371077}.Debug|Win32.Build.0 = Debug|Win32
                 {470832FD-33D6-4F31-AD06-BB7838371077}.Release|Win32.ActiveCfg = Release|Win32
                 {470832FD-33D6-4F31-AD06-BB7838371077}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection

Modified: sandbox/monotonic/libs/monotonic/test/monotonic.vcproj
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/monotonic.vcproj (original)
+++ sandbox/monotonic/libs/monotonic/test/monotonic.vcproj 2009-06-19 19:51:00 EDT (Fri, 19 Jun 2009)
@@ -41,7 +41,7 @@
                         <Tool
                                 Name="VCCLCompilerTool"
                                 Optimization="0"
- AdditionalIncludeDirectories="$(ProjectDir)/../../.."
+ AdditionalIncludeDirectories="$(ProjectDir)/../../..;C:\Lib\tbb21_20080605oss\include"
                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
                                 MinimalRebuild="true"
                                 ExceptionHandling="2"
@@ -49,7 +49,7 @@
                                 RuntimeLibrary="3"
                                 UsePrecompiledHeader="0"
                                 WarningLevel="3"
- DebugInformationFormat="4"
+ DebugInformationFormat="3"
                         />
                         <Tool
                                 Name="VCManagedResourceCompilerTool"
@@ -63,6 +63,7 @@
                         <Tool
                                 Name="VCLinkerTool"
                                 LinkIncremental="2"
+ AdditionalLibraryDirectories="C:\Lib\tbb21_20080605oss\ia32\vc9\lib"
                                 GenerateDebugInformation="true"
                                 SubSystem="1"
                                 TargetMachine="1"
@@ -299,6 +300,10 @@
                         </File>
                 </Filter>
                 <File
+ RelativePath=".\AllocatorTypes.h"
+ >
+ </File>
+ <File
                         RelativePath=".\basic_tests.cpp"
>
                         <FileConfiguration
@@ -343,23 +348,23 @@
>
                         <FileConfiguration
                                 Name="Debug|Win32"
- ExcludedFromBuild="true"
>
                                 <Tool
                                         Name="VCCLCompilerTool"
                                 />
                         </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\main.cpp"
+ >
                         <FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
                                 <Tool
                                         Name="VCCLCompilerTool"
                                 />
                         </FileConfiguration>
- </File>
- <File
- RelativePath=".\main.cpp"
- >
                         <FileConfiguration
                                 Name="Release|Win32"
                                 ExcludedFromBuild="true"


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