aboutsummaryrefslogtreecommitdiff
path: root/lib/alloc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/alloc')
-rw-r--r--lib/alloc/arena_alloc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/alloc/arena_alloc.c b/lib/alloc/arena_alloc.c
index d953423..965c6a7 100644
--- a/lib/alloc/arena_alloc.c
+++ b/lib/alloc/arena_alloc.c
@@ -60,9 +60,7 @@ alloc(allocator_t mem, ptrdiff_t nmemb, ptrdiff_t elemsz, ptrdiff_t align)
arena_ctx_t *ctx = mem.ctx;
if (ctx->blksz == 0) {
long blksz = sysconf(_SC_PAGESIZE);
- if (blksz == -1)
- errjmp(mem.err);
- ctx->blksz = blksz;
+ ctx->blksz = blksz == -1 ? 4096 : blksz;
}
ptrdiff_t bufsz;