An allocator that enforces that all allocated memory returned to the caller begins at the start of a cache line. More...
Classes | |
struct | rebind |
Provides a way to obtain an allocator for a different type. More... | |
Public Member Functions | |
cache_line_aligned_allocator (cache_line_aligned_allocator const &) noexcept=default | |
template<typename U > | |
cache_line_aligned_allocator (cache_line_aligned_allocator< U > const &) noexcept | |
pointer | address (reference x) const noexcept |
const_pointer | address (const_reference x) const noexcept |
pointer | allocate (size_type n, cache_line_aligned_allocator< void >::const_pointer=0) |
void | deallocate (pointer p, size_type) |
size_type | max_size (void) const noexcept |
void | construct (pointer p, const_reference val) |
void | destroy (pointer p) |
template<typename U , typename... Args> | |
void | construct (U *p, Args &&... args) |
template<typename U > | |
void | destroy (U *p) |
An allocator that enforces that all allocated memory returned to the caller begins at the start of a cache line.
Backed by malloc, this allocator overallocates enough to be able to (a) advance pointer to proper alignment and (b) have storage in front for original address malloc() gave to it (so that it can properly call free().