diff options
Diffstat (limited to 'src/chunk_mmap.c')
-rw-r--r-- | src/chunk_mmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chunk_mmap.c b/src/chunk_mmap.c index a91a14c..36eb075 100644 --- a/src/chunk_mmap.c +++ b/src/chunk_mmap.c @@ -24,7 +24,8 @@ chunk_alloc_mmap_slow(size_t size, size_t alignment, bool *zero, bool *commit) assert(ret != NULL); *zero = true; - *commit = true; + if (!*commit) + *commit = pages_decommit(ret, size); return (ret); } @@ -61,7 +62,8 @@ chunk_alloc_mmap(size_t size, size_t alignment, bool *zero, bool *commit) assert(ret != NULL); *zero = true; - *commit = true; + if (!*commit) + *commit = pages_decommit(ret, size); return (ret); } |