Mike Hommey
26b3c4f285
Bug 1138293 - Remove moz_malloc/moz_free/moz_realloc/moz_calloc. r=njn
...
We need to use _impl variants within mozalloc.h when they are defined because
of how mozglue.dll is linked on Windows, where using malloc/free would use
the symbols from the MSVCRT instead of ours.
2015-03-31 12:32:49 +09:00
Mike Hommey
7fef46c799
Bug 1142434 - Remove moz_memalign/moz_valloc, nothing uses them. r=njn
2015-03-31 12:26:45 +09:00
Mike Hommey
d0806aa5f6
Bug 1142434 - Remove moz_strdup/moz_strndup, nothing uses them. r=njn
2015-03-31 12:26:45 +09:00
Ehsan Akhgari
883849ee32
Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
...
This patch was automatically generated using the following script:
function convert() {
echo "Converting $1 to $2..."
find . \
! -wholename "*/.git*" \
! -wholename "obj-ff-dbg*" \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Mike Hommey
5b1c46a9cb
Followup for bug 868814 - replace non-obvious #if with simpler alternative. rs=njn
2015-03-17 10:04:20 +09:00
Mike Hommey
b8f2a1380c
Bug 1141731 - Avoid problems caused by the inclusion of mozmemory.h in mozalloc.cpp by including mozmemory_wrap.h instead. r=njn
2015-03-11 16:03:53 +09:00
Wes Kocher
b9f1c057ec
Backed out changeset ff08cf105def (bug 1141731) for osx bustage
2015-03-10 18:34:28 -07:00
Mike Hommey
e5effb28c1
Bug 1141731 - Avoid problems caused by the inclusion of mozmemory.h in mozalloc.cpp by including mozmemory_wrap.h instead. r=njn
2015-03-11 09:52:04 +09:00
Mike Hommey
635ebcf228
Bug 1141660 - Fix bustage from bug 868814 with --disable-replace-malloc. r=njn
2015-03-11 09:52:03 +09:00
Mike Hommey
b35abc35cc
Bug 1139357 - Make jemalloc3's --without-export actually work. r=njn
2015-03-10 10:01:53 +09:00
Mike Hommey
364038011c
Bug 868814 - Fold mozalloc library into mozglue. r=njn
...
--HG--
rename : memory/mozalloc/moz.build => memory/mozalloc/staticruntime/moz.build
2015-03-10 10:01:52 +09:00
Mike Hommey
abd5c031e0
Bug 1138705 - Preserve LastError when calling TlsGetValue. r=njn
...
TlsGetValue has a semantic difference with pthread_getspecific, in that it
can return a non-error NULL value, so it always sets the LastError.
But allocator callers may not be expecting calling e.g. free() to change
the value of the last error, so preserve it.
2015-03-04 14:40:09 +09:00
Anish
4063a569ed
Bug 958147 - Choose one of run-if or skip-if and get rid of the other.r=jmaher, mwargers
2015-03-03 08:46:37 -05:00
Mike Hommey
6dd0c8c299
Bug 762449 - Fix "result of 32-bit shift implicitly converted to 64 bits" on win64. r=njn
2015-03-02 07:35:28 +09:00
Mike Hommey
cefaffffe9
Bug 762449 - Make jemalloc's opt.lg_dirty_mult work as documented. r=njn
2015-03-02 07:35:28 +09:00
Chris Peterson
a7dcfcca64
Bug 1129326 - Remove nonstandard let blocks from memory/replace/dmd/test/test_dmd.js. r=njn
2015-01-24 23:37:31 -08:00
Brian Smith
1bb835dbca
Bug 1128413, Part 4: Fix warnings in mozilla-config.h and gcc-stl-wrapper.template.h, r=glandium
...
--HG--
extra : rebase_source : 7ba4fb8a0bd11648908e2790e86ce3bb4517aeb7
2015-02-02 17:35:19 -08:00
Mike Hommey
a35dbaeebf
Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
...
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Mike Hommey
03b3291d3f
Bug 1120272 - Expose _aligned_alloc and _aligned_free from mozglue. r=njn
2015-01-20 13:10:00 +09:00
Seth Fowler
fb673b7c3a
Bug 1121297 (Part 2) - Make VolatileBuffer threadsafe. r=glandium
2015-01-16 15:47:35 -08:00
Seth Fowler
26bd4c1cb6
Bug 1121297 (Part 1) - Move VolatileBuffer into libxul. r=glandium
...
--HG--
rename : memory/mozalloc/VolatileBuffer.h => memory/volatile/VolatileBuffer.h
rename : memory/mozalloc/VolatileBufferAshmem.cpp => memory/volatile/VolatileBufferAshmem.cpp
rename : memory/mozalloc/VolatileBufferFallback.cpp => memory/volatile/VolatileBufferFallback.cpp
rename : memory/mozalloc/VolatileBufferOSX.cpp => memory/volatile/VolatileBufferOSX.cpp
rename : memory/mozalloc/VolatileBufferWindows.cpp => memory/volatile/VolatileBufferWindows.cpp
rename : memory/mozalloc/moz.build => memory/volatile/moz.build
rename : memory/mozalloc/tests/TestVolatileBuffer.cpp => memory/volatile/tests/TestVolatileBuffer.cpp
rename : memory/mozalloc/tests/moz.build => memory/volatile/tests/moz.build
2015-01-16 15:47:22 -08:00
Nicholas Nethercote
a479e9ccad
Bug 1121830 - DMD: add "num" property to blocks in the output. r=mccr8.
...
The new "num" property lets identical blocks be aggregated in the output. This
patch only uses the "num" property for dead blocks, because that's where the
greatest potential benefit lies, but it could be used for live blocks as well.
On one test case (a complex PDF file) running with --mode=cumulative
--sample-below=1 this patch had the following effects.
- Change in running speed was negligible.
- Compressed output file size dropped from 8.8 to 5.0 MB.
- Compressed output file size dropped from 297 to 50 MB.
- dmd.py runtime (without stack fixing) dropped from 30 to 8 seconds.
--HG--
extra : rebase_source : 46a32058cd5c31cd823fe3f1accb5e68bcd320f3
2015-01-15 20:38:38 -08:00
Nicholas Nethercote
059cf96c41
Bug 1122337 - Mark DMD directories as FAIL_ON_WARNINGS. r=glandium.
...
The DEFINES and XPCOM_API changes are needed to get rid of "inconsistent dll
linkage" warnings on Windows builds.
--HG--
extra : rebase_source : 00756f51ebee85c70f65d51dbac17b4835262697
2015-01-15 21:17:18 -08:00
Mike Hommey
af38583e2e
Bug 1121314 - Avoid needing the arena in chunk_alloc_default to avoid possible infinite loops involving a0malloc. r=njn
...
The infinite loop happens if chunk_alloc_arena needs to be called when a0malloc
is called. It in turn calls chunk_alloc_default, which uses tsd, which calls
a0malloc if it's the first time the tsd is being gotten from the current thread.
tsd only uses a0malloc on platforms where there is no native thread local storage
support, which, for Mozilla, essentially means anything that is not Linux.
But the tsd is only neededto get the dss precedence setting of the given arena.
That setting has no effect when dss is disabled, which it is on Windows and Mac.
Moreover, the default setting for dss precedence is "secondary", which means
jemalloc only tries dss after it failed to get memory with mmap/VirtualAlloc.
Considering the cases where mmap/VirtualAlloc would fail essentially means
there is shortage of address space, sbrk() is not going to have much more
success, so we might as well disable dss support on all platforms, avoiding
the infinite loop problem on Android and B2G as well.
2015-01-14 15:18:49 +09:00
Mike Hommey
2e083509f2
Bug 1120798 - Use a larger realloc in one of the DMD tests so that it passes for mozjemalloc as well as jemalloc3. r=njn
2015-01-14 15:18:49 +09:00
Masatoshi Kimura
bf312ad056
Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo
2015-01-11 11:34:52 +09:00
Brad Lassey
0e7333b6e7
bug 1083116 - build fails: malloc_decls.h conflicting types for 'malloc_usable_size' r=glandium
2015-01-06 19:58:36 -05:00
Nicholas Nethercote
cdd9ba9d57
Bug 1088343 (part 2) - Enable test_dmd on Win64. r=glandium.
...
--HG--
extra : rebase_source : b85a5e35c71f44d7f615bc67863711a4876e9da4
2015-01-08 16:04:43 -08:00
Ehsan Akhgari
4354953b4f
Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
...
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:
#!/bin/bash
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "*/.git*" \
! -wholename "obj-*" \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Guilherme Goncalves
c6a10e7bb5
Bug 899126 - Part 2 - Measure bookkeeping in jemalloc3. r=glandium.
2014-12-29 13:42:14 -08:00
Guilherme Goncalves
750b113679
Bug 899126 - Part 1.5 - Implement bookkeeping for jemalloc3. r=glandium
2014-12-29 13:37:24 -08:00
Jan Beich
f4828d35f5
Bug 1115078 - Unbreak MOZ_JEMALLOC3 build on FreeBSD after bug 899126. r=glandium
2014-12-23 12:32:00 -05:00
Guilherme Goncalves
1fb7597a1b
Bug 1110514 - Use arena.<i>.purge to free jemalloc3's dirty pages. r=glandium
2014-12-23 02:41:00 -05:00
Guilherme Goncalves
802cb55877
Bug 1108045 - Junk memory with jemalloc3. r=glandium
2014-12-23 07:44:00 -05:00
Guilherme Goncalves
f9d70a5255
Bug 762448 - Bump opt.lg_dirty_mult in jemalloc3 to reduce number of dirty pages. r=glandium
2014-12-23 06:01:00 -05:00
Guilherme Goncalves
5ff0106324
Bug 762448 - Deduct bin_unused from waste in jemalloc3's stats. r=glandium
2014-11-12 13:00:00 -05:00
Ryan VanderMeulen
42a3e6c0ea
Merge m-c to inbound. a=merge
2014-12-23 13:18:02 -05:00
Guilherme Goncalves
c41a18c8d2
Bug 1112566 - Add a isblank definition for MSVC < 2013. r=glandium
2014-12-23 15:27:19 +09:00
Guilherme Goncalves
aa02623d99
Bug 1112566 - Move variable declaration to the top its block for MSVC compatibility. r=jasone,r=glandium
2014-12-23 15:27:18 +09:00
Vladimir Vukicevic
a910628209
Bug 1112566 - Use jemalloc C99 msvc compat headers when building mozjemalloc compat glue and jemalloc3 replace-malloc library. r=glandium
2014-12-23 15:27:18 +09:00
Guilherme Goncalves
22c6a4800b
Bug 899126 - Part 1: Implement bin_unused for jemalloc3. r=glandium
2014-12-19 09:15:00 -05:00
Nicholas Nethercote
53da6fb716
Bug 1112968 - dmd.py: Tweak the --alloc-fns list for better effect on Windows. r=mccr8.
...
--HG--
extra : rebase_source : 3dc8a09f9a22bf234406c0ff89d7b4050c7908e7
2014-12-18 18:59:53 -08:00
Nicholas Nethercote
8030658f62
Bug 1112968 - dmd.py: Tweak the --alloc-fns list for better effect on Mac. r=mccr8.
...
--HG--
extra : rebase_source : 03dbab1eeb4e3f99672a174277ba634a39a98292
2014-12-17 19:10:59 -08:00
Guilherme Goncalves
60eb32a82c
Bug 1094275 - Update the in-tree copy of jemalloc3 to commit b4acf73. r=glandium
2014-12-17 09:14:48 +09:00
Nicholas Nethercote
658df429fc
Bug 1110455 - Add --sort-by=num-blocks option to dmd.py. r=mccr8.
...
--HG--
extra : rebase_source : 6d6aa87f102ee069f4f5052607463380c656f80d
2014-12-15 15:04:39 -08:00
Nicholas Nethercote
e358318e29
Bug 1111419 - dmd.py: add a cache for recordKeyParts. r=mccr8.
...
This reduces the runtime on my Linux machine for one large DMD output file from
235 seconds to 105 seconds.
--HG--
extra : rebase_source : bd567319c1207a09fa47b94571066109de1cc9e7
2014-12-15 15:04:34 -08:00
Ehsan Akhgari
ebdf8e7c36
Bug 1109746 - Fix more bad implicit constructors in some random code across the tree
...
--HG--
extra : amend_source : 48ca151cb1ca2193404c65831556051c02093914
2014-12-13 14:17:04 -05:00
Ryan VanderMeulen
9a56a97e41
Backed out changesets 34a66a625618, 32db3daa20fe, and ac15ba8568c5 (bug 1102219) for Gaia unit test failures.
...
--HG--
extra : rebase_source : 0266cc0b2a6568ca653885745f381df8d6d167ec
2014-12-11 11:28:30 -05:00
ziyunfei
5f470bd4a1
Bug 1102219 - Part 3: Replace String.prototype.contains with String.prototype.includes in chrome code. r=till
2014-12-10 20:50:00 -05:00
Chris Peterson
793516eb34
Bug 1108934 - Fix -Wunused-const-variable warning-as-error in non-unified build of memory/mozalloc. r=glandium
2014-12-08 21:26:27 -08:00