WPILibC++ 2025.1.1
|
A BlockAllocator that allows only one block allocation. More...
#include <wpi/memory/memory_arena.hpp>
Public Types | |
using | allocator_type = typename traits::allocator_type |
Public Member Functions | |
fixed_block_allocator (std::size_t block_size, allocator_type alloc=allocator_type()) noexcept | |
memory_block | allocate_block () |
void | deallocate_block (memory_block block) noexcept |
std::size_t | next_block_size () const noexcept |
allocator_type & | get_allocator () noexcept |
A BlockAllocator that allows only one block allocation.
It can be used to prevent higher-level allocators from expanding. The one block allocation is performed through the allocate_array()
function of the given RawAllocator.
using wpi::memory::fixed_block_allocator< RawAllocator >::allocator_type = typename traits::allocator_type |
|
inlineexplicitnoexcept |
block_size
must be greater than 0,
|
inline |
allocate_array()
function of the RawAllocator or out_of_memory if this is not the first call.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
0
.