|
| AlignedAllocator () |
|
| AlignedAllocator (const AlignedAllocator< T, Alignment, Memory > &other) |
|
template<typename U > |
| AlignedAllocator (const AlignedAllocator< U, Alignment, Memory > &other) |
|
| AlignedAllocator (AlignedAllocator< T, Alignment, Memory > &&other) |
|
template<typename U > |
| AlignedAllocator (AlignedAllocator< U, Alignment, Memory > &&other) |
|
| ~AlignedAllocator () |
|
pointer | allocate (size_type n, const void *=nullptr) |
|
void | deallocate (pointer ptr, size_type) |
|
AlignedAllocator< T, Alignment, Memory > & | operator= (const AlignedAllocator< T, Alignment, Memory > &)=default |
|
AlignedAllocator< T, Alignment, Memory > & | operator= (AlignedAllocator< T, Alignment, Memory > &&)=default |
|
template<typename T, std::size_t Alignment = 32, typename Memory = AlignedMemory>
class vsmc::AlignedAllocator< T, Alignment, Memory >
Aligned allocator.
- Template Parameters
-
T | The value type |
Alignment | The alignment requirement of memory, must be a power of two and no less than sizeof(void *) . |
Memory | The memory management class. Must provides two member functions, aligned_malloc and aligned_free . The member function aligned_malloc shall behave similar to std::malloc but take an additional arguments for alignment. The member function aligned_free shall behave just like std::free . |
Definition at line 267 of file aligned_memory.hpp.