Commit Graph

72 Commits

Author SHA1 Message Date
Jon Coppeard
3ab8746f2f Bug 956501 - Update mozjemalloc chunk_alloc_mmap functions to latest upstream version r=glandium 2014-01-14 10:06:25 +00:00
Kai-Zhen Li
e5f028ebdd Bug 957450 - fix compile error in gonk-kk. r=iacobcatalin 2014-01-10 14:14:53 +08:00
David Major
15316a7107 Bug 931196 - Remove MOZ_TEMP_INVESTIGATION poisoning code. r=glandium 2013-10-31 11:52:08 -04:00
Nathan Froyd
b1113c8592 Bug 925169 - part 1 - don't use MOZ_MEMORY_SIZEOF_PTR_2POW in jemalloc.c; r=glandium 2013-10-09 19:04:43 -04:00
Douglas Crosher
7c0bdcc600 Bug 908971 - jemalloc: fix uninitialized 'mapped' variable. r=jlebar 2013-08-24 13:35:08 +10:00
Justin Lebar
1726d50ad3 Bug 903420 - Two fixes to jemalloc's memory reporters. r=glandium
1) We were counting "dirty" pages in "waste", when we shouldn't have
   been.  This was causing the assertion at the end of jemalloc_stats()
   which checks that mapped memory is greater than committed memory to
   fail.

2) jemalloc_stats used stats_chunks.curchunks to measure the number of
   mapped pages.  This was problematic for two reasons.

   a) stats_chunks.curchunks was not locked when it was modified in
      chunk_{de}alloc(), so its value could be garbage.

   b) Even if it had been locked properly, it was possible for an
      allocation to occur during a call to jemalloc_stats which would
      cause the measured amount of allocated memory to exceed the
      measured amount of mapped memory, tripping the assertion we
      tripped in (1).

   We fixed these issues by deleting stats_chunks entirely, and by
   introducing huge_mapped, which measures the amount of memory mapped
   by huge allocations (and is properly protected by huge_mtx).

   We now measure the amount of mapped memory by adding huge_mapped and
   each arena's mapped memory, and we do this in such a way that even if
   an allocation occurs during our call to jemalloc_stats, we'll still
   get a consistent result (where mapped >= committed).
2013-08-15 11:15:04 -07:00
Mike Hommey
b160bf4524 Bug 901211 - Don't use static page size on ia64, sparc and mips. r=jlebar 2013-08-05 09:10:35 +09:00
Justin Lebar
129a323342 Bug 898558 - Rework jemalloc_stats so it exposes how much memory is used for bookkeeping. r=glandium
This patch also gets rid of the redundant "committed" entry, so now
there's no confusion as to which entries overlap.
2013-07-29 09:10:53 -07:00
Steve Singer
5d9d7a7afd Bug 851859 - Set jemalloc's page size based on the architecture instead of assuming it's always 4kb. r=jlebar 2013-03-27 11:32:34 -04:00
Mike Hommey
0c085761d5 Bug 804303 part 2 - Add ability to dynamically replace or supplement jemalloc implementation. r=jlebar,r=khuey 2012-12-07 09:32:24 +01:00
Mike Hommey
2b38a675fe Bug 804303 part 1 - Cleanup how the mozjemalloc/jemalloc3 glue is set up, attempting to make it clearer. r=jlebar,r=khuey 2012-12-07 09:32:24 +01:00
Gabriele Svelto
05c7900df0 Bug 811740 - Reduce the amount of unused dirty pages kept by jemalloc to 1MiB in B2G. r=jlebar, r=glandium 2012-11-28 17:03:35 +01:00
Gabriele Svelto
43c132fe16 Bug 805855 - Add an extra function to jemalloc to free dirty unused pages. r=glandium 2012-11-08 20:06:50 +01:00
Justin Lebar
c77120d27e Bug 787675 - When jemalloc hits a fatal assertion, crash within a new stack frame, in the hopes of making the crashstats more understandable. r=glandium 2012-09-03 22:01:24 -04:00
Michael Wu
be4dcb9bd4 Bug 780287 - Don't wrap jemalloc on gonk, r=glandium 2012-08-06 16:22:26 -04:00
Jan Beich
a72019aed3 Bug 778058 - Don't #define _malloc_message to malloc_message in jemalloc: FreeBSD's jemalloc-3.0.0 exports malloc_message (with different arguments) in stdlib.h. r=jlebar 2012-07-29 10:54:44 -04:00
Justin Lebar
ac9fab4393 Bug 772338 - Abort when VirtualAlloc fails in jemalloc's pages_commit routine. r=glandium 2012-07-10 09:25:25 -04:00
Justin Lebar
1984e7b305 Bug 766250 - Part 2: Split MOZ_TEMP_INVESTIGATION into MOZ_TEMP_INVESTIGATION and MOZ_JEMALLOC_HARD_ASSERTS. r=glandium
The former is temporary, the latter is not.
2012-06-20 01:22:40 -04:00
Justin Lebar
8619831cb1 Bug 766250 - Part 1: Enable more release-time jemalloc assertions. r=glandium 2012-06-20 01:22:40 -04:00
Justin Lebar
5e5816c20a Bug 764192 - Followup, fix red. r=me 2012-06-13 09:21:06 -04:00
Justin Lebar
98a65fb213 Bug 764192 - Enable some jemalloc assertions at release time in the hopes of catching heap corruption. r=glandium
This is disabled for the release and esr channels.
2012-06-13 09:10:12 -04:00
Mike Hommey
9cb1b0492f Bug 580408 - Move Mozilla fork of jemalloc to memory/mozjemalloc. r=khuey 2012-06-07 10:41:58 +02:00