memory
|
A BlockAllocator that reserves virtual memory and commits it part by part.
It is similar to memory_stack but does not support growing and uses virtual memory, also meant for big blocks not small allocations.
Member Functions | |
virtual_block_allocator (std::size_t block_size, std::size_t no_blocks) | |
~virtual_block_allocator () noexcept | |
memory_block | allocate_block () |
void | deallocate_block (memory_block block) noexcept |
std::size_t | next_block_size () const noexcept |
std::size_t | capacity_left () const noexcept |
virtual_block_allocator (virtual_block_allocator &&other) noexcept | |
virtual_block_allocator & | operator= (virtual_block_allocator &&other) noexcept |
|
explicit |
block_size * no_blocks
. block_size
must be non-zero and a multiple of the virtual_memory_page_size. no_blocks
must be bigger than 1
.
|
noexcept |
|
noexcept |
|
noexcept |
memory_block allocate_block | ( | ) |
|
noexcept |
block
must be the current top block of the memory, this is guaranteed by memory_arena.
|
noexcept |
|
noexcept |