summaryrefslogtreecommitdiffstats
path: root/main/xulrunner/mallctl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/xulrunner/mallctl.patch')
-rw-r--r--main/xulrunner/mallctl.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/xulrunner/mallctl.patch b/main/xulrunner/mallctl.patch
new file mode 100644
index 0000000000..7c56f584e6
--- /dev/null
+++ b/main/xulrunner/mallctl.patch
@@ -0,0 +1,28 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=815681
+
+diff --git a/xpcom/base/AvailableMemoryTracker.cpp b/xpcom/base/AvailableMemoryTracker.cpp
+index 69af67d..ef98fec 100644
+--- a/xpcom/base/AvailableMemoryTracker.cpp
++++ b/xpcom/base/AvailableMemoryTracker.cpp
+@@ -26,9 +26,7 @@
+ # include <windows.h>
+ #endif
+
+-#if defined(MOZ_MEMORY)
+ # include "jemalloc.h"
+-#endif // MOZ_MEMORY
+
+ using namespace mozilla;
+
+@@ -498,11 +496,7 @@ nsJemallocFreeDirtyPagesRunnable::Run()
+ {
+ MOZ_ASSERT(NS_IsMainThread());
+
+-#if defined(MOZ_JEMALLOC)
+- mallctl("arenas.purge", nullptr, 0, nullptr, 0);
+-#elif defined(MOZ_MEMORY)
+ jemalloc_free_dirty_pages();
+-#endif
+
+ return NS_OK;
+ }