refactor(all): Fixed alloc and moved growing logic to another function

OK, so evrything was a fucknig mess, it still kinda is, AI helped
me to clean my own mess, it really sucks but the fucking debugger
and address sanitizer were not working, also, there were small
small errors so no big deal but still, a bit sad, also changed a
the way i cast from uint8_t to double and int in the tests, may
change that i guess, verything else i might say is good :)
This commit is contained in:
2026-04-03 12:44:01 -06:00
parent 39dfded924
commit 0c2e819c2b
5 changed files with 129 additions and 53 deletions

View File

@@ -53,10 +53,11 @@ ArenaPointer arena_alloc(Arena *arena, size_t size, size_t alignment);
ArenaPointer arena_push(Arena *arena, void *data, size_t size, size_t alignment);
ArenaErr arena_realloc(Arena *arena, size_t new_capacity);
SizeResult align_arena_offset(Arena *arena, size_t alignment);
SizeResult get_arena_align_padding(Arena *arena, size_t alignment);
ArenaErr arena_ensure_capacity(Arena *arena, size_t size, size_t alignment);
// Should be moved to something like general utilities,
// i should make one for all my c projects
bool mul_size_t_safe(size_t a, size_t b, size_t *out);
#endif // !ARENA_H