Commit Graph

20 Commits

Author SHA1 Message Date
David Major
986ec3972c Bug 931196 - Remove MOZ_TEMP_INVESTIGATION poisoning code. r=glandium 2013-10-31 11:52:08 -04:00
Nathan Froyd
1012aff6b9 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
1c4d303bce Bug 908971 - jemalloc: fix uninitialized 'mapped' variable. r=jlebar 2013-08-24 13:35:08 +10:00
Justin Lebar
b966ab06c5 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
987e662e58 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
7502304ad5 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.

--HG--
extra : rebase_source : 429f3d44011f02dda43aa10b077c917c4d02fe50
2013-07-29 09:10:53 -07:00
Steve Singer
2a6c9d4ab8 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
6bc0fa9501 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
95d176978d Bug 804303 part 1 - Cleanup how the mozjemalloc/jemalloc3 glue is set up, attempting to make it clearer. r=jlebar,r=khuey
--HG--
rename : memory/build/extraMallocFuncs.c => memory/build/jemalloc_config.c
rename : memory/mozjemalloc/jemalloc.h => memory/build/mozmemory.h
rename : memory/build/extraMallocFuncs.c => memory/build/mozmemory_wrap.c
2012-12-07 09:32:24 +01:00
Gabriele Svelto
b90b929ddf 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
1e1d781bc1 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
ef1cfe7ce6 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
a14e332a6a Bug 780287 - Don't wrap jemalloc on gonk, r=glandium 2012-08-06 16:22:26 -04:00
Jan Beich
1d29b667ac 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
4e57306b6e Bug 772338 - Abort when VirtualAlloc fails in jemalloc's pages_commit routine. r=glandium 2012-07-10 09:25:25 -04:00
Justin Lebar
da584aabcc 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
19e808194e Bug 766250 - Part 1: Enable more release-time jemalloc assertions. r=glandium 2012-06-20 01:22:40 -04:00
Justin Lebar
ce0bd3c816 Bug 764192 - Followup, fix red. r=me 2012-06-13 09:21:06 -04:00
Justin Lebar
ae40e43536 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.

--HG--
extra : rebase_source : 0b668cfbb63d6478a4200a414cd0dafa0cfba1ce
2012-06-13 09:10:12 -04:00
Mike Hommey
b12cf02925 Bug 580408 - Move Mozilla fork of jemalloc to memory/mozjemalloc. r=khuey
--HG--
rename : memory/jemalloc/Makefile.in => memory/mozjemalloc/Makefile.in
rename : memory/jemalloc/jemalloc.c => memory/mozjemalloc/jemalloc.c
rename : memory/jemalloc/jemalloc.h => memory/mozjemalloc/jemalloc.h
rename : memory/jemalloc/jemalloc_types.h => memory/mozjemalloc/jemalloc_types.h
rename : memory/jemalloc/linkedlist.h => memory/mozjemalloc/linkedlist.h
rename : memory/jemalloc/osx_zone_types.h => memory/mozjemalloc/osx_zone_types.h
rename : memory/jemalloc/ql.h => memory/mozjemalloc/ql.h
rename : memory/jemalloc/qr.h => memory/mozjemalloc/qr.h
rename : memory/jemalloc/rb.h => memory/mozjemalloc/rb.h
2012-06-07 10:41:58 +02:00