aboutsummaryrefslogtreecommitdiff
path: root/mail/thunderbird/files/patch-bug1082199
diff options
context:
space:
mode:
Diffstat (limited to 'mail/thunderbird/files/patch-bug1082199')
-rw-r--r--mail/thunderbird/files/patch-bug108219926
1 files changed, 26 insertions, 0 deletions
diff --git a/mail/thunderbird/files/patch-bug1082199 b/mail/thunderbird/files/patch-bug1082199
new file mode 100644
index 000000000000..e24fe4726c2c
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1082199
@@ -0,0 +1,26 @@
+commit 258ec90
+Author: Guilherme Goncalves <guilherme.p.gonc@gmail.com>
+Date: Fri Oct 17 15:55:00 2014 +0200
+
+ Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium
+---
+ memory/build/mozjemalloc_compat.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 78bb13a..70265a7 100644
+--- mozilla/memory/build/mozjemalloc_compat.c
++++ mozilla/memory/build/mozjemalloc_compat.c
+@@ -68,6 +68,12 @@ jemalloc_stats_impl(jemalloc_stats_t *stats)
+ size_t active, allocated, mapped, page, pdirty;
+ size_t lg_chunk;
+
++ // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in
++ // src/ctl.c
++ uint64_t epoch = 0;
++ size_t esz = sizeof(epoch);
++ int ret = je_(mallctl)("epoch", &epoch, &esz, &epoch, esz);
++
+ CTL_GET("arenas.narenas", narenas);
+ CTL_GET("arenas.page", page);
+ CTL_GET("stats.active", active);