mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-15 17:36:21 +03:00
Fix potential VM map fragmentation regression.
Revert 245ae6036c (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.
This commit is contained in:
parent
de23f6fce7
commit
dd752c1ffd
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue