Fix potential VM map fragmentation regression.
Revert 245ae6036c09cc11a72fab4335495d95cddd5beb (Support --with-lg-page
values larger than actual page size.), because it could cause VM map
fragmentation if the kernel grows mmap()ed memory downward.
This resolves #391.
diff --git a/src/arena.c b/src/arena.c
index c605bcd..ce62590 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -2687,7 +2687,7 @@
return (NULL);
alignment = PAGE_CEILING(alignment);
- alloc_size = usize + large_pad + alignment;
+ alloc_size = usize + large_pad + alignment - PAGE;
malloc_mutex_lock(tsdn, &arena->lock);
run = arena_run_alloc_large(tsdn, arena, alloc_size, false);