Crashpad
|
A standard allocator that aligns its allocations as requested, suitable for use as an allocator in standard containers. More...
#include "util/stdlib/aligned_allocator.h"
Classes | |
struct | rebind |
Public Member Functions | |
AlignedAllocator (const AlignedAllocator &other) noexcept | |
template<typename U > | |
AlignedAllocator (const AlignedAllocator< U, Alignment > &other) noexcept | |
pointer | address (reference x) const noexcept |
const_pointer | address (const_reference x) const noexcept |
pointer | allocate (size_type n, std::allocator< void >::const_pointer hint=0) |
void | deallocate (pointer p, size_type n) |
size_type | max_size () const noexcept |
template<class U , class... Args> | |
void | construct (U *p, Args &&... args) |
template<class U > | |
void | destroy (U *p) |
A standard allocator that aligns its allocations as requested, suitable for use as an allocator in standard containers.
This is similar to std::allocator<T>
, with the addition of an alignment guarantee. Alignment must be a power of 2. If Alignment is not specified, the default alignment for type T is used.