memory
|
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.
Typedefs | |
using | segregatable = Segregatable |
using | segregatable_allocator_type = typename segregatable::allocator_type |
using | fallback_allocator_type = typename allocator_traits< RawAllocator >::allocator_type |
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 |
|
explicit |
void * allocate_node | ( | std::size_t | size, |
std::size_t | alignment | ||
) |
|
noexcept |
void * allocate_array | ( | std::size_t | count, |
std::size_t | size, | ||
std::size_t | alignment | ||
) |
|
noexcept |
std::size_t max_node_size | ( | ) | const |
Segregatable
for smaller ones. std::size_t max_array_size | ( | ) | const |
Segregatable
for smaller ones. std::size_t max_alignemnt | ( | ) | const |
Segregatable
for smaller ones.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |