Simple monotonic arena for short-lived allocations.
More...
#include <RADDataStructures.h>
|
| | RADMonotonicArena (size_t capacity=65536) |
| | Creates an arena with initial capacity bytes. More...
|
| |
| void * | allocate (size_t size, size_t alignment=alignof(std::max_align_t)) |
| | Allocates size bytes with alignment. More...
|
| |
| void | reset () |
| | Resets all allocations without releasing storage. More...
|
| |
| size_t | used () const |
| | Returns allocated bytes in the current generation. More...
|
| |
| size_t | capacity () const |
| | Returns backing capacity. More...
|
| |
Simple monotonic arena for short-lived allocations.
◆ RADMonotonicArena()
| RADData::RADMonotonicArena::RADMonotonicArena |
( |
size_t |
capacity = 65536 | ) |
|
|
inlineexplicit |
Creates an arena with initial capacity bytes.
◆ allocate()
| void* RADData::RADMonotonicArena::allocate |
( |
size_t |
size, |
|
|
size_t |
alignment = alignof(std::max_align_t) |
|
) |
| |
|
inline |
Allocates size bytes with alignment.
◆ capacity()
| size_t RADData::RADMonotonicArena::capacity |
( |
| ) |
const |
|
inline |
Returns backing capacity.
◆ reset()
| void RADData::RADMonotonicArena::reset |
( |
| ) |
|
|
inline |
Resets all allocations without releasing storage.
◆ used()
| size_t RADData::RADMonotonicArena::used |
( |
| ) |
const |
|
inline |
Returns allocated bytes in the current generation.
The documentation for this class was generated from the following file: