feat and fix: Made arena_init use malloc and added arena_destroy

Realized that if i want to use malloc and free i either have to make some
sort of interface that lets you use a custom allocator and deallocator
or just use them by default. Maybe later it would be cool to change it
to that but for now is out of the scope of my project.

# Tipos:
# feat, fix, refactor, docs, style, test, chore
This commit is contained in:
2026-03-29 18:00:57 -06:00
parent d95d7f2b51
commit 47c0a04166
2 changed files with 15 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ typedef struct {
};
} ArenaResult;
ArenaResult arena_init(void *buffer, size_t size);
ArenaResult arena_init(size_t size);
void arena_destroy(Arena *arena);
ArenaPointer arena_alloc(Arena *arena, size_t size, size_t alignment);