cds
2.3.2
|
Allocator for aligned data. More...
#include <cds/details/aligned_allocator.h>
Data Structures | |
struct | rebind |
Rebinds allocator to other type Q instead of T . More... | |
Public Types | |
typedef ALIGNED_ALLOCATOR::template rebind< T >::other | allocator_type |
Underlying aligned allocator type. | |
Public Member Functions | |
template<typename... S> | |
T * | New (size_t nAlign, const S &... src) |
Analogue of operator new T(src ... ) | |
T * | NewArray (size_t nAlign, size_t nCount) |
Analogue of operator new T[nCount ]. | |
template<typename S > | |
T * | NewArray (size_t nAlign, size_t nCount, const S &src) |
Analogue of operator new T[nCount ]. More... | |
void | Delete (T *p) |
Analogue of operator delete. | |
void | Delete (T *p, size_t nCount) |
Analogue of operator delete []. | |
template<typename... S> | |
T * | Construct (void *p, const S &... src) |
Analogue of placement operator new( p ) T( src ... ) | |
Allocator for aligned data.
The class is the wrapper around user-defined aligned allocator. Template parameters:
T
is a type to allocate ALIGNED_ALLOCATOR
is an aligned allocator implementation. Default implementation is defined by macro CDS_DEFAULT_ALIGNED_ALLOCATOR from cds/user_setup/allocator.h header file.The nAlign
parameter of member function specifyes desired aligment of data allocated.
T
must be multiple of nAlign:
|
inline |
Analogue of operator new T[nCount
].
Each item of array of type T is initialized by parameter src
.