|
Nugget
Bare-metal libraries and examples for the original PlayStation
|
A bump allocator whose capacity is chosen at runtime. More...
#include <psyqo/bump-allocator.hh>
Public Member Functions | |
| DynamicBumpAllocator (void *storage, size_t size) | |
| template<Primitive P, typename... Args> | |
| Fragments::SimpleFragment< P > & | allocateFragment (Args &&...args) |
| template<typename T , typename... Args> | |
| T & | allocate (Args &&...args) |
| void | reset () |
| size_t | remaining () const |
| size_t | used () const |
| size_t | capacity () const |
A bump allocator whose capacity is chosen at runtime.
Same interface as BumpAllocator, for when the capacity is only known at runtime. It does not own its storage: the caller provides size bytes, 4-byte aligned, which must outlive every fragment allocated from it.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |