From eee70bdcab6f4a0430c29e32242c0dae90783b26 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 7 Feb 2003 18:43:48 +0000 Subject: [PATCH] Added BOOST_QA_PAGE_SIZE. [SVN r17270] --- include/boost/detail/quick_allocator.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/detail/quick_allocator.hpp b/include/boost/detail/quick_allocator.hpp index 2d8d735..195e602 100644 --- a/include/boost/detail/quick_allocator.hpp +++ b/include/boost/detail/quick_allocator.hpp @@ -55,8 +55,16 @@ template struct allocator_impl // // The other alternative is to use much bigger pages (1M.) +#if defined(BOOST_QA_PAGE_SIZE) + + enum { items_per_page = BOOST_QA_PAGE_SIZE / size }; + +#else + enum { items_per_page = 496 / size }; // 1048560 / size +#endif + #ifdef BOOST_HAS_THREADS static lightweight_mutex mutex; #endif