cds  2.3.2
allocator.h File Reference

Default implementation of allocator classes. More...

#include <memory>
#include <cds/os/alloc_aligned.h>

Macros

#define CDS_DEFAULT_ALLOCATOR   std::allocator<int>
 
#define CDS_DEFAULT_ALIGNED_ALLOCATOR   cds::OS::aligned_allocator<int>
 

Detailed Description

Default implementation of allocator classes.

If you want to use your allocator implementation you should define all or one of the following macro before including CDS library headers:

  • CDS_DEFAULT_ALLOCATOR
  • CDS_DEFAULT_ALIGNED_ALLOCATOR

Macro Definition Documentation

◆ CDS_DEFAULT_ALIGNED_ALLOCATOR

#define CDS_DEFAULT_ALIGNED_ALLOCATOR   cds::OS::aligned_allocator<int>

The macro defines aligned allocator implementation.

The default is cds::OS::aligned_allocator<int>. The library uses the cds::OS::aligned_allocator<int>::rebind<Q>::other to redefine allocator's type int to proper type Q.

◆ CDS_DEFAULT_ALLOCATOR

#define CDS_DEFAULT_ALLOCATOR   std::allocator<int>

The macro defines standard allocator implementation. Default is std::allocator.

The CDS library uses std::allocator<int> to emulate template template parameter. The library uses the std::allocator<int>::rebind<Q>::other to redefine allocator's type to proper type Q.


cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:12 by Doxygen 1.8.13