diff options
author | Jason Evans <jasone@canonware.com> | 2016-06-07 21:15:49 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-06-07 21:15:49 (GMT) |
commit | dd752c1ffd92b9d7573aa5ce49bcc5e74588c3dc (patch) | |
tree | 061e868a9c43817e53a63a2fd77be6b2622e25d1 /src | |
parent | de23f6fce7fa49b3ac9c1a6e36131464ecce2f01 (diff) | |
download | jemalloc-dd752c1ffd92b9d7573aa5ce49bcc5e74588c3dc.zip jemalloc-dd752c1ffd92b9d7573aa5ce49bcc5e74588c3dc.tar.gz jemalloc-dd752c1ffd92b9d7573aa5ce49bcc5e74588c3dc.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/extent_mmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extent_mmap.c b/src/extent_mmap.c index 0dd3247..23dd4f8 100644 --- a/src/extent_mmap.c +++ b/src/extent_mmap.c @@ -9,7 +9,7 @@ extent_alloc_mmap_slow(size_t size, size_t alignment, bool *zero, bool *commit) void *ret; size_t alloc_size; - alloc_size = size + alignment; + alloc_size = size + alignment - PAGE; /* Beware size_t wrap-around. */ if (alloc_size < size) return (NULL); |