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::pool_allocator_type=-1; 00009 #elif defined USE_GPL_POOL_ALLOCATOR 00010 // obsolete but placed here to identify old binary 00011 const int osl::stl::pool_allocator_type=1; 00012 #elif defined USE_BOOST_POOL_ALLOCATOR 00013 const int osl::stl::pool_allocator_type=2; 00014 #else 00015 const int osl::stl::pool_allocator_type=0; 00016 #endif 00017 00018 osl::stl:: 00019 ConsistencyCheck::ConsistencyCheck(int value) 00020 { 00021 if (value != pool_allocator_type) 00022 { 00023 const char *error = "compile option error! POOL_ALLOCATOR inconsistency"; 00024 std::cerr << error << "\n"; 00025 std::cerr << value << " != " << pool_allocator_type << "\n"; 00026 throw std::logic_error(error); 00027 } 00028 } 00029 00030 /* ------------------------------------------------------------------------- */ 00031 // ;;; Local Variables: 00032 // ;;; mode:c++ 00033 // ;;; c-basic-offset:2 00034 // ;;; End: