summaryrefslogtreecommitdiffstats
path: root/src/arena.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-04-25 00:28:55 (GMT)
committerJason Evans <jasone@canonware.com>2017-04-25 03:37:16 (GMT)
commitc67c3e4a63277718b9d137a38663c6ae324c99aa (patch)
tree18d2f1f3a5eaaa0b5549c64691e6ed16c3c9f47c /src/arena.c
parente2cc6280ed96e2e6a2754d4e7187296e377d9548 (diff)
downloadjemalloc-c67c3e4a63277718b9d137a38663c6ae324c99aa.zip
jemalloc-c67c3e4a63277718b9d137a38663c6ae324c99aa.tar.gz
jemalloc-c67c3e4a63277718b9d137a38663c6ae324c99aa.tar.bz2
Replace --disable-munmap with opt.munmap.
Control use of munmap(2) via a run-time option rather than a compile-time option (with the same per platform default). The old behavior of --disable-munmap can be achieved with --with-malloc-conf=munmap:false. This partially resolves #580.
Diffstat (limited to 'src/arena.c')
-rw-r--r--src/arena.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arena.c b/src/arena.c
index 1288b7b..3b94a20 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -1143,7 +1143,7 @@ arena_destroy_retained(tsdn_t *tsdn, arena_t *arena) {
* opportunity to unmap all retained memory without having to keep its
* own metadata structures, but if deallocation fails, that is the
* application's decision/problem. In practice, retained extents are
- * leaked here if !config_munmap unless the application provided custom
+ * leaked here if !opt_munmap unless the application provided custom
* extent hooks, so best practice is to either enable munmap (and avoid
* dss for arenas to be destroyed), or provide custom extent hooks that
* either unmap retained extents or track them for later use.
@@ -1947,7 +1947,7 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) {
goto label_error;
}
- if (!config_munmap) {
+ if (!opt_munmap) {
atomic_store_u(&arena->extent_grow_next, psz2ind(HUGEPAGE),
ATOMIC_RELAXED);
}