diff options
| author | @syxhe <https://t.me/syxhe> | 2025-04-21 21:51:54 -0500 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-04-21 21:51:54 -0500 |
| commit | c704a8a382c231e066a7fbf0402a33455c40b8f5 (patch) | |
| tree | 0c4000906060013de91ea7fc1888cedcbc34159e /src/arena.h | |
| parent | 521e9a2fc8e0ef1dffe4e590d0d4f65292f0d1df (diff) | |
Rework dlinkedlist functions to use VALLOC macro instead of only xalloc
Diffstat (limited to 'src/arena.h')
| -rw-r--r-- | src/arena.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/arena.h b/src/arena.h index e65b041..1c1c576 100644 --- a/src/arena.h +++ b/src/arena.h | |||
| @@ -3,12 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include <stddef.h> | 4 | #include <stddef.h> |
| 5 | 5 | ||
| 6 | // Whether to use `XALLOC` or normal `malloc` functions for acquiring new memory in an arena. `> 0` | ||
| 7 | // enables XALLOC functionality | ||
| 8 | #define ___VXGG___USE_XALLOC_FOR_ARENAS___ 1 | ||
| 9 | |||
| 10 | #define VALLOC(nmemb, size) ((___VXGG___USE_XALLOC_FOR_ARENAS___ > 0) ? xmalloc((nmemb) * (size)) : malloc((nmemb) * (size))) | ||
| 11 | |||
| 12 | // Normal arena. Can expand in size beyond original allocation | 6 | // Normal arena. Can expand in size beyond original allocation |
| 13 | typedef struct arena arena; | 7 | typedef struct arena arena; |
| 14 | 8 | ||
