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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user