This stateless allocator performs all of its allocation calls using aligned memory invocations.
More...
#include <aligned_allocator.hpp>
|
using | default_alignment = std::integral_constant< std::size_t, 1 > |
|
This stateless allocator performs all of its allocation calls using aligned memory invocations.
- Satisfies
- Allocator
- Satisfies
- Stateless
Definition at line 58 of file aligned_allocator.hpp.
◆ aligned_allocator() [1/2]
◆ aligned_allocator() [2/2]
◆ deallocate()
void bit::memory::aligned_allocator::deallocate |
( |
owner< void *> |
p, |
|
|
std::size_t |
size |
|
) |
| |
Deallocates a pointer p
with the allocation size of size
.
- Parameters
-
p | the pointer to deallocate |
size | the size to deallocate |
◆ info()
Gets the info about this allocator.
This defaults to 'aligned_allocator'. Use a named_aligned_allocator to override this
- Returns
- the info for this allocator
◆ operator=() [1/2]
Move-assigns an aligned_allocator from another allocator.
- Parameters
-
- Returns
- reference to
(*this)
◆ operator=() [2/2]
Copy-assigns an aligned_allocator from another allocator.
- Parameters
-
- Returns
- reference to
(*this)
◆ try_allocate()
owner<void*> bit::memory::aligned_allocator::try_allocate |
( |
std::size_t |
size, |
|
|
std::size_t |
align |
|
) |
| |
|
noexcept |
Allocates aligned memory of size size
, with alignment to a boundary of at least align
.
- Parameters
-
size | the size of this allocation |
align | the requested alignment |
- Returns
- the allocated pointer, or nullptr on failure
The documentation for this class was generated from the following file: