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.
This commit is contained in:
Jason Evans
2017-04-24 17:28:55 -07:00
parent e2cc6280ed
commit c67c3e4a63
16 changed files with 77 additions and 85 deletions

View File

@@ -131,7 +131,6 @@ TEST_BEGIN(test_mallctl_config) {
TEST_MALLCTL_CONFIG(fill, bool);
TEST_MALLCTL_CONFIG(lazy_lock, bool);
TEST_MALLCTL_CONFIG(malloc_conf, const char *);
TEST_MALLCTL_CONFIG(munmap, bool);
TEST_MALLCTL_CONFIG(prof, bool);
TEST_MALLCTL_CONFIG(prof_libgcc, bool);
TEST_MALLCTL_CONFIG(prof_libunwind, bool);
@@ -158,6 +157,7 @@ TEST_BEGIN(test_mallctl_opt) {
} while (0)
TEST_MALLCTL_OPT(bool, abort, always);
TEST_MALLCTL_OPT(bool, munmap, always);
TEST_MALLCTL_OPT(const char *, dss, always);
TEST_MALLCTL_OPT(unsigned, narenas, always);
TEST_MALLCTL_OPT(const char *, percpu_arena, always);