![]() |
WPILibC++ 2025.3.2
|
A RawAllocator adapter that ensures a minimum alignment. More...
#include <wpi/memory/aligned_allocator.hpp>
Public Types | |
| using | allocator_type = typename allocator_traits<RawAllocator>::allocator_type |
| using | is_stateful = std::true_type |
Public Member Functions | |
| aligned_allocator (std::size_t min_alignment, allocator_type &&alloc={}) | |
| std::size_t | min_alignment () const noexcept |
| void | set_min_alignment (std::size_t min_alignment) |
| aligned_allocator (aligned_allocator &&other) noexcept | |
| aligned_allocator & | operator= (aligned_allocator &&other) noexcept |
| void * | allocate_node (std::size_t size, std::size_t alignment) |
| void * | allocate_array (std::size_t count, std::size_t size, std::size_t alignment) |
| void | deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept |
| void | deallocate_array (void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept |
| void * | try_allocate_node (std::size_t size, std::size_t alignment) noexcept |
| void * | try_allocate_array (std::size_t count, std::size_t size, std::size_t alignment) noexcept |
| bool | try_deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept |
| bool | try_deallocate_array (void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept |
| std::size_t | max_node_size () const |
| std::size_t | max_array_size () const |
| std::size_t | max_alignment () const |
| allocator_type & | get_allocator () noexcept |
| const allocator_type & | get_allocator () const noexcept |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<class RawAllocator > | |
| auto | make_aligned_allocator (std::size_t min_alignment, RawAllocator &&allocator) noexcept -> aligned_allocator< typename std::decay< RawAllocator >::type > |
A RawAllocator adapter that ensures a minimum alignment.
It adjusts the alignment value so that it is always larger than the minimum and forwards to the specified allocator.
| using wpi::memory::aligned_allocator< RawAllocator >::allocator_type = typename allocator_traits<RawAllocator>::allocator_type |
| using wpi::memory::aligned_allocator< RawAllocator >::is_stateful = std::true_type |
|
inlineexplicit |
min_alignment must be less than this->max_alignment().
|
inlinenoexcept |
aligned_allocator object. It simply moves the underlying allocator.
|
inline |
|
inline |
alignment is less than the min_alignment(), it is set to the minimum alignment.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
min_alignment must be less than this->max_alignment().
|
inlinenoexcept |
|
inlinenoexcept |
alignment is less than the min_alignment(), it is set to the minimum alignment.
|
inlinenoexcept |
|
inlinenoexcept |
|
related |