3 #ifndef OSL_POOL_ALLOCATOR_H
4 #define OSL_POOL_ALLOCATOR_H
6 #ifdef USE_TBB_SCALABLE_ALLOCATOR
7 # include <tbb/scalable_allocator.h>
9 #ifdef USE_BOOST_POOL_ALLOCATOR
11 # include <boost/pool/pool_alloc.hpp>
12 # include <boost/mpl/if.hpp>
34 #ifdef USE_TBB_SCALABLE_ALLOCATOR
41 pool_allocator(
const tbb::scalable_allocator<T2>& src) : tbb::scalable_allocator<T>(src) {}
43 #elif USE_BOOST_POOL_ALLOCATOR
46 struct fast_pool_allocator
47 : boost::mpl::if_c<(sizeof(T) <= 128),
48 boost::fast_pool_allocator
50 boost::default_user_allocator_new_delete,
54 std::allocator<T> >::type
56 fast_pool_allocator() {}
57 template <class T2, class T3, class T4, unsigned int U>
58 fast_pool_allocator(const boost::fast_pool_allocator<T2,T3,T4,U>& src) {}
60 fast_pool_allocator(const std::allocator<T2>& src) {}
63 struct pool_allocator : std::allocator<T>
67 pool_allocator(const std::allocator<T2>&) {}
70 static ConsistencyCheck consistency_check(0);
72 struct pool_allocator : std::allocator<T>
76 pool_allocator(const std::allocator<T2>&) {}