summaryrefslogtreecommitdiff
path: root/src/arena.h
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-05-14 12:19:34 -0500
committer@syxhe <https://t.me/syxhe>2025-05-14 12:19:34 -0500
commit928238bdcbc78c4196eb4a3508808c79e31f7c84 (patch)
tree6ce7c393be64ba26c54f9f5f8d3fa442c6f5833d /src/arena.h
parent9be8b5f26a29dad04035386331461c4c320f9237 (diff)
Update signatures of free-type functions to match the freecallback signature
Diffstat (limited to 'src/arena.h')
-rw-r--r--src/arena.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/arena.h b/src/arena.h
index 1c1c576..907a2fa 100644
--- a/src/arena.h
+++ b/src/arena.h
@@ -26,10 +26,7 @@ arena * arena_init(size_t bytes);
26void * arena_alloc(arena * const arena, size_t bytes); 26void * arena_alloc(arena * const arena, size_t bytes);
27 27
28// Free an arena its memory pool(s). Returns -1 and sets `errno` if the given arena is NULL 28// Free an arena its memory pool(s). Returns -1 and sets `errno` if the given arena is NULL
29int arena_free(arena **arena); 29void arena_free(void *a);
30
31// Clear an arena of its contents (frees and inits an arena in 1). Returns -1 and sets `errno` if the given arena is NULL
32int arena_clear(arena **arena);
33 30
34 31
35// Initializes a simple arena. 32// Initializes a simple arena.
@@ -39,9 +36,6 @@ simplearena * simplearena_init(size_t bytes);
39void * simplearena_alloc(simplearena * const a, size_t bytes); 36void * simplearena_alloc(simplearena * const a, size_t bytes);
40 37
41// Free a simple arena. Exits / returns -1 on error depending on the value of `___VXGG___USE_XALLOC_FOR_ARENAS___` 38// Free a simple arena. Exits / returns -1 on error depending on the value of `___VXGG___USE_XALLOC_FOR_ARENAS___`
42int simplearena_free(simplearena **a); 39void simplearena_free(simplearena *a);
43
44// Clear a simple arena and its memory pool (frees and inits a simple arena in 1). Exits / returns -1 on error depending on the value of `___VXGG___USE_XALLOC_FOR_ARENAS___`
45int simplearena_clear(simplearena **a);
46 40
47#endif \ No newline at end of file 41#endif \ No newline at end of file