Bug 1153683 - mozjemalloc: track MADV_FREE'd pages on all BSDs.
MozReview-Commit-ID: ALPXVxR8heH
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -120,17 +120,17 @@
* We therefore define MALLOC_DOUBLE_PURGE on Mac. This causes jemalloc to
* track which pages have been MADV_FREE'd. You can then call
* jemalloc_purge_freed_pages(), which will force the OS to release those
* MADV_FREE'd pages, making the process's RSS reflect its true memory usage.
*
* The jemalloc_purge_freed_pages definition in memory/build/mozmemory.h needs
* to be adjusted if MALLOC_DOUBLE_PURGE is ever enabled on Linux.
*/
-#ifdef MOZ_MEMORY_DARWIN
+#if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_BSD)
#define MALLOC_DOUBLE_PURGE
#endif
/*
* MALLOC_PRODUCTION disables assertions and statistics gathering. It also
* defaults the A and J runtime options to off. These settings are appropriate
* for production systems.
*/