diff options
Diffstat (limited to 'src/arena.c')
| -rw-r--r-- | src/arena.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arena.c b/src/arena.c index 62dbbf8..de3523b 100644 --- a/src/arena.c +++ b/src/arena.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <errno.h> | 7 | #include <errno.h> |
| 8 | #include <error.h> | 8 | #include <error.h> |
| 9 | 9 | ||
| 10 | #define VALLOC(nmemb, size) ((___VXGG___USE_XALLOC_FOR_ARENAS___ > 0) ? xcalloc((nmemb), (size)) : malloc((nmemb) * (size))) | 10 | #define VALLOC(nmemb, size) ((___VXGG___USE_XALLOC_FOR_ARENAS___ > 0) ? xmalloc((nmemb) * (size)) : malloc((nmemb) * (size))) |
| 11 | 11 | ||
| 12 | typedef struct an { | 12 | typedef struct an { |
| 13 | void *membase; | 13 | void *membase; |
| @@ -150,7 +150,7 @@ simplearena * simplearena_init(size_t bytes) { | |||
| 150 | return arena_init(bytes); | 150 | return arena_init(bytes); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | void* simplearena_alloc(simplearena * const a, size_t bytes) { | 153 | void * simplearena_alloc(simplearena * const a, size_t bytes) { |
| 154 | // The criteria to allocate new memory in arena_alloc is 'bytes > ((a->current)->allocated - (a->current)->used)', so if this | 154 | // The criteria to allocate new memory in arena_alloc is 'bytes > ((a->current)->allocated - (a->current)->used)', so if this |
| 155 | // is true, just return NULL & set errno | 155 | // is true, just return NULL & set errno |
| 156 | 156 | ||
