3 #ifndef __CDS_USER_SETUP_ALLOCATOR_H
4 #define __CDS_USER_SETUP_ALLOCATOR_H
7 \brief Default implementation of allocator classes.
9 If you want to use your allocator implementation you should define all or one of the following macro before
10 including CDS library headers:
11 \li CDS_DEFAULT_ALLOCATOR
12 \li CDS_DEFAULT_ALIGNED_ALLOCATOR
15 #ifndef CDS_DEFAULT_ALLOCATOR
17 /** \def CDS_DEFAULT_ALLOCATOR
18 The macro defines standard allocator implementation. Default is std::allocator.
20 The CDS library uses \p std::allocator<int> to emulate template template parameter.
21 The library uses the <tt> std::allocator<int>::rebind<Q>::other </tt> to redefine allocator's type to proper type \p Q.
23 #define CDS_DEFAULT_ALLOCATOR std::allocator<int>
29 #ifndef CDS_DEFAULT_ALIGNED_ALLOCATOR
31 /** \def CDS_DEFAULT_ALIGNED_ALLOCATOR
32 The macro defines aligned allocator implementation.
34 The default is \ref cds::OS::aligned_allocator "cds::OS::aligned_allocator<int>".
35 The library uses the <tt> cds::OS::aligned_allocator<int>::rebind<Q>::other </tt> to redefine allocator's type \p int to proper type \p Q.
37 #define CDS_DEFAULT_ALIGNED_ALLOCATOR cds::OS::aligned_allocator<int>
39 # include <cds/os/alloc_aligned.h>
42 #endif // #ifndef __CDS_USER_SETUP_ALLOCATOR_H