|
libarena
Arena memory management library
|
#include <arena.h>
Data Fields | |
| void * | mem |
| A pointer to the memory block of the arena. | |
| void * | ptr |
| A pointer to the current position in the memory block. | |
| ArenaBlock * | head |
| A pointer to the head block of the arena. | |
| size_t | idx |
| The index of the current block within the arena. | |
| size_t | size |
| The size of the memory block in bytes. | |
| size_t | maxBlocks |
| The maximum number of blocks that can be allocated in the arena. | |
| bool | managed |
| A flag indicating whether the arena is managed or not. | |
Arena structure.
This structure represents an arena of memory. It contains information about the arena's memory, pointer, head block, index, size, maximum block count, and management status.
| ArenaBlock* head |
A pointer to the head block of the arena.
| size_t idx |
The index of the current block within the arena.
| bool managed |
A flag indicating whether the arena is managed or not.
| size_t maxBlocks |
The maximum number of blocks that can be allocated in the arena.
| void* mem |
A pointer to the memory block of the arena.
| void* ptr |
A pointer to the current position in the memory block.
| size_t size |
The size of the memory block in bytes.