Hermes
0.9.5-beta
Hierarchical Distributed I/O Buffering System
|
#include <memory_management.h>
Public Attributes | |
u8 * | base |
size_t | used |
size_t | capacity |
ArenaErrorFunc * | error_handler |
i32 | temp_count |
A block of memory that can be divided up dynamically.
An Arena must be initialized from a contiguous block of allocated memory. After it's initialized, you can use it like new
via the PushStruct and PushArray calls. Note that this Arena is designed to persist for the application lifetime, so we don't have a need to free anything out of it.
Example:
size_t hermes::Arena::used |
Number of bytes currently in use
size_t hermes::Arena::capacity |
Total number of bytes in the block tracked by this Arena
ArenaErrorFunc* hermes::Arena::error_handler |
Per-arena error handling function
i32 hermes::Arena::temp_count |
The number of ScopedTemporaryMemory instances that are using this Arena