00001 /* pool_allocator.cc 00002 */ 00003 #include "osl/stl/pool_allocator.h" 00004 #include <stdexcept> 00005 #include <iostream> 00006 00007 #ifdef USE_TBB_SCALABLE_ALLOCATOR 00008 const int osl::stl::gpl_pool_allocator_used=-1; 00009 #else 00010 #ifdef USE_GPL_POOL_ALLOCATOR 00011 const int osl::stl::gpl_pool_allocator_used=1; 00012 #else 00013 const int osl::stl::gpl_pool_allocator_used=0; 00014 #endif 00015 #endif 00016 00017 osl::stl:: 00018 ConsistencyCheck::ConsistencyCheck(int value) 00019 { 00020 if (value != gpl_pool_allocator_used) 00021 { 00022 const char *error = "compile option error! USE_GPL_POOL_ALLOCATOR inconsistency"; 00023 std::cerr << error << "\n"; 00024 std::cerr << value << " != " << gpl_pool_allocator_used << "\n"; 00025 throw std::logic_error(error); 00026 } 00027 } 00028 00029 /* ------------------------------------------------------------------------- */ 00030 // ;;; Local Variables: 00031 // ;;; mode:c++ 00032 // ;;; c-basic-offset:2 00033 // ;;; End: