A wrapper around the memory_stack that is used by the temporary_allocator.
More...
#include <wpi/memory/temporary_allocator.hpp>
A wrapper around the memory_stack that is used by the temporary_allocator.
There should be at least one per-thread.
◆ growth_tracker
The type of the handler called when the internal memory_stack grows.
It gets the size of the new block that will be allocated.
- Required Behavior:
- The handler shall log the growth, throw an exception or aborts the program. If this function does not return, the growth is prevented but the allocator unusable until memory is freed.
- Default Behavior:
- The default handler does nothing.
◆ temporary_stack()
wpi::memory::temporary_stack::temporary_stack |
( |
std::size_t | initial_size | ) |
|
|
inlineexplicit |
- Effects:
- Creates it with a given initial size of the stack. It can grow if needed, although that is expensive.
- Requires:
initial_size
must be greater than 0
.
◆ get_growth_tracker()
◆ next_capacity()
std::size_t wpi::memory::temporary_stack::next_capacity |
( |
| ) |
const |
|
inlinenoexcept |
◆ set_growth_tracker()
◆ get_temporary_stack()
The documentation for this class was generated from the following file: