|
memory
|
A RawAllocator with a fallback.
Allocation first tries Default, if it fails, it uses Fallback.
Default must be a composable RawAllocator, Fallback must be a RawAllocator. Typedefs | |
| using | default_allocator_type |
| using | fallback_allocator_type |
| using | is_stateful |
Member Functions | |
| fallback_allocator () | |
| fallback_allocator (default_allocator_type &&default_alloc, fallback_allocator_type &&fallback_alloc={}) | |
| 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 * | 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 |
| default_allocator_type & | get_default_allocator () noexcept |
| const default_allocator_type & | get_default_allocator () const noexcept |
| fallback_allocator_type & | get_fallback_allocator () noexcept |
| const fallback_allocator_type & | get_fallback_allocator () const noexcept |
| fallback_allocator | ( | ) |
|
explicit |
| void * allocate_node | ( | std::size_t | size, |
| std::size_t | alignment ) |
default_allocator_type. If that fails, uses the non-compositioning function of the fallback_allocator_type. | void * allocate_array | ( | std::size_t | count, |
| std::size_t | size, | ||
| std::size_t | alignment ) |
default_allocator_type. If that fails, uses the non-compositioning function of the fallback_allocator_type.
|
noexcept |
default_allocator_type. If that fails, uses the non-compositioning function of the fallback_allocator_type.
|
noexcept |
default_allocator_type. If that fails, uses the non-compositioning function of the fallback_allocator_type.
|
noexcept |
default_allocator_type. If that fails, uses the compositioning function of the fallback_allocator_type. fallback_allocator_type msut be composable.
|
noexcept |
default_allocator_type. If that fails, uses the compositioning function of the fallback_allocator_type. fallback_allocator_type msut be composable.
|
noexcept |
default_allocator_type. If that fails, uses the compositioning function of the fallback_allocator_type. fallback_allocator_type msut be composable.
|
noexcept |
default_allocator_type. If that fails, uses the compositioning function of the fallback_allocator_type. fallback_allocator_type msut be composable. | std::size_t max_node_size | ( | ) | const |
| std::size_t max_array_size | ( | ) | const |
| std::size_t max_alignment | ( | ) | const |
|
noexcept |
const) reference to the default allocator.
|
noexcept |
const) reference to the default allocator.
|
noexcept |
const) reference to the fallback allocator.
|
noexcept |
const) reference to the fallback allocator.
1.13.2