feat: Added arena_alloc

Added arena_alloc and decided to change the arena pointer type from void *
to uint8_t * because i need to support 1 byte pointer arithmetic, thought of
using uintptr_t but not sure, the support seems really weird from what i read
online so i'm sticking with good old uint8_t * (wich i know works).
This commit is contained in:
2026-03-29 18:35:13 -06:00
parent 47c0a04166
commit cde457593e
2 changed files with 30 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
#include <stdbool.h>
typedef struct {
void *data;
uint8_t *data;
size_t size;
size_t offset;
} Arena;
@@ -24,7 +24,7 @@ typedef struct {
bool is_valid;
union {
ArenaErr err;
void *pointer;
uint8_t *pointer;
};
} ArenaPointer;