Bug 1482797 - Don't use MADV_FREE on Linux until we support it properly. r=njn
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 15 Aug 2018 17:21:25 +0900
changeset 486789 0d27c68cfaf85c07e1059184f17354b358228dfe
parent 486788 2852ef02208099ba0d9635794ec975d757db9425
child 486790 de505fb3dfcdf779a76dc97b9f4da91138288307
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1482797
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1482797 - Don't use MADV_FREE on Linux until we support it properly. r=njn
memory/build/mozjemalloc.cpp
--- a/memory/build/mozjemalloc.cpp
+++ b/memory/build/mozjemalloc.cpp
@@ -202,16 +202,21 @@ getenv(const char* name)
     return mozillaMallocOptionsBuf;
   }
 
   return nullptr;
 }
 #endif
 
 #ifndef XP_WIN
+// Newer Linux systems support MADV_FREE, but we're not supporting
+// that properly. bug #1406304.
+#if defined(XP_LINUX) && defined(MADV_FREE)
+#undef MADV_FREE
+#endif
 #ifndef MADV_FREE
 #define MADV_FREE MADV_DONTNEED
 #endif
 #endif
 
 // Some tools, such as /dev/dsp wrappers, LD_PRELOAD libraries that
 // happen to override mmap() and call dlsym() from their overridden
 // mmap(). The problem is that dlsym() calls malloc(), and this ends