pool_allocator.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pool_allocator.cc
Go to the documentation of this file.
1 /* pool_allocator.cc
2 */
3 #include "osl/stl/pool_allocator.h"
4 #include <stdexcept>
5 #include <iostream>
6
7 #ifdef USE_TBB_SCALABLE_ALLOCATOR
8 const int osl::stl::pool_allocator_type=-1;
9 #elif defined USE_GPL_POOL_ALLOCATOR
10 // obsolete but placed here to identify old binary
11 const int osl::stl::pool_allocator_type=1;
12 #elif defined USE_BOOST_POOL_ALLOCATOR
13 const int osl::stl::pool_allocator_type=2;
14 #else
15 const int osl::stl::pool_allocator_type=0;
16 #endif
17
18 osl::stl::
19 ConsistencyCheck::ConsistencyCheck(int value)
20 {
21 if (value != pool_allocator_type)
22 {
23 const char *error = "compile option error! POOL_ALLOCATOR inconsistency";
24 std::cerr << error << "\n";
25 std::cerr << value << " != " << pool_allocator_type << "\n";
26 throw std::logic_error(error);
27 }
28 }
29
30 /* ------------------------------------------------------------------------- */
31 // ;;; Local Variables:
32 // ;;; mode:c++
33 // ;;; c-basic-offset:2
34 // ;;; End: