diff options
Diffstat (limited to 'src/arena.h')
| -rw-r--r-- | src/arena.h | 10 |
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); | |||
| 26 | void * arena_alloc(arena * const arena, size_t bytes); | 26 | void * 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 |
| 29 | int arena_free(arena **arena); | 29 | void 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 | ||
| 32 | int 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); | |||
| 39 | void * simplearena_alloc(simplearena * const a, size_t bytes); | 36 | void * 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___` |
| 42 | int simplearena_free(simplearena **a); | 39 | void 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___` | ||
| 45 | int simplearena_clear(simplearena **a); | ||
| 46 | 40 | ||
| 47 | #endif \ No newline at end of file | 41 | #endif \ No newline at end of file |
