v1.2.1 - Region growth factor handling with new ARENA_REGION_GROWTH_FACTOR macro

This commit is contained in:
2026-04-08 21:51:51 +02:00
parent e91dbb6a65
commit 66306ad8e4
2 changed files with 27 additions and 1 deletions

7
test.c
View File

@@ -9,6 +9,7 @@
#endif // DEBUG
#define ARENA_IMPLEMENTATION
#define ARENA_REGION_GROWTH_FACTOR 2
#include "arena.h"
void arena_print(Arena arena)
@@ -50,8 +51,14 @@ int main(void)
arena_print(a);
char *str = arena_sprintf(&a, "Formatted string %x", 0xCAFE);
for (size_t i = 0; i < 1000; ++i) {
str = arena_sprintf(&a, "Formatted string %d", i);
}
printf("%s\n", str);
arena_print(a);
arena_free(&a);
return 0;
}