WPILibC++ 2025.1.1
|
A RawAllocator that either uses the Segregatable or the other RawAllocator
.
More...
#include <wpi/memory/segregator.hpp>
Public Types | |
using | segregatable = Segregatable |
using | segregatable_allocator_type = typename segregatable::allocator_type |
using | fallback_allocator_type = typename allocator_traits<RawAllocator>::allocator_type |
Public Member Functions | |
binary_segregator (segregatable s, fallback_allocator_type fallback=fallback_allocator_type()) | |
void * | allocate_node (std::size_t size, std::size_t alignment) |
void | deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept |
void * | allocate_array (std::size_t count, std::size_t size, std::size_t alignment) |
void | deallocate_array (void *array, 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_alignemnt () const |
segregatable_allocator_type & | get_segregatable_allocator () noexcept |
const segregatable_allocator_type & | get_segregatable_allocator () const noexcept |
fallback_allocator_type & | get_fallback_allocator () noexcept |
const fallback_allocator_type & | get_fallback_allocator () const noexcept |
A RawAllocator that either uses the Segregatable or the other RawAllocator
.
It is a faster alternative to fallback_allocator that doesn't require a composable allocator and decides about the allocator to use purely with the Segregatable
based on size and alignment.
using wpi::memory::binary_segregator< Segregatable, RawAllocator >::fallback_allocator_type = typename allocator_traits<RawAllocator>::allocator_type |
using wpi::memory::binary_segregator< Segregatable, RawAllocator >::segregatable = Segregatable |
using wpi::memory::binary_segregator< Segregatable, RawAllocator >::segregatable_allocator_type = typename segregatable::allocator_type |
|
inlineexplicit |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
Segregatable
for smaller ones.