Disable munmap() if it causes VM map holes.

Add a configure test to determine whether common mmap()/munmap()
patterns cause VM map holes, and only use munmap() to discard unused
chunks if the problem does not exist.

Unify the chunk caching for mmap and dss.

Fix options processing to limit lg_chunk to be large enough that
redzones will always fit.
This commit is contained in:
Jason Evans
2012-04-12 20:20:58 -07:00
parent d6abcbb14b
commit 7ca0fdfb85
11 changed files with 277 additions and 244 deletions

View File

@@ -102,6 +102,13 @@ static const bool config_prof_libunwind =
false
#endif
;
static const bool config_munmap =
#ifdef JEMALLOC_MUNMAP
true
#else
false
#endif
;
static const bool config_stats =
#ifdef JEMALLOC_STATS
true