An arena manages a contiguous region of memory by dividing it into chunks.
Synopsis
Declared in <support/lockedpool.h>
class Arena;
Types
Name |
Description |
Memory statistics. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroys the arena. |
|
Deleted copy assignment; an Arena cannot be copied. |
Return whether a pointer points inside this arena. This returns base <= ptr < (base+size) so only use it for (inclusive) chunk starting addresses. |
|
Allocate size bytes from this arena. Returns pointer on success, or 0 if memory is full or the application tried to allocate 0 bytes. |
|
Free a previously allocated chunk of memory. Freeing the zero pointer has no effect. Raises std::runtime_error in case of error. |
|
Get arena usage statistics |
Created with MrDocs