Improve modularity, introduce arena_create()

This commit is contained in:
seajee
2025-07-24 15:38:21 +02:00
parent 49e0e14d7c
commit 26fd7f1118
2 changed files with 43 additions and 16 deletions

5
test.c
View File

@@ -2,13 +2,12 @@
#include <stdlib.h>
#ifdef DEBUG
#define malloc(n) (printf("%s:%d:%s: malloc(%ld)\n",\
__FILE__, __LINE__, __func__, (n)), malloc((n)));
#define realloc(p, s) (printf("%s:%d:%s: realloc(%p, %lu)\n",\
__FILE__, __LINE__, __func__, (p), (s)), realloc((p), (s)));
#define free(p) (printf("%s:%d:%s: free(%p)\n",\
__FILE__, __LINE__, __func__, (p)), free((p)));
#endif // DEBUG
#define ARENA_MIN_CAPACITY 400
#define ARENA_IMPLEMENTATION
#include "arena.h"