Граф коммитов

231 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote fe34f19459 Bug 1486690 - Rename nsMemory::Clone() and remove unnecessary checks after it. r=glandium
The 'x' in the new name makes it clearer that it's infallible.

--HG--
extra : rebase_source : 51fd946c482befe8a8ca5bd88ecc967971f455da
2018-08-28 15:59:19 +10:00
Masatoshi Kimura 3d01e517aa Bug 1484184 - Remove now unused _RAISE macro check to deal with MSVC 2017 15.8. r=froydnj
--HG--
extra : source : b38403f36056d301321c128be96ee60d14739859
2018-08-17 01:27:29 +09:00
Narcis Beleuzu 96343e8f1f Backed out 3 changesets (bug 1484184, bug 1484190, bug 1484191) for bustages on test_toolchain_configure.py. CLOSED TREE
Backed out changeset dca5444170e0 (bug 1484190)
Backed out changeset 1ef81d07bc5b (bug 1484184)
Backed out changeset 2a42fd4df1bb (bug 1484191)
2018-08-20 19:49:37 +03:00
Masatoshi Kimura 59a91c2a72 Bug 1484184 - Remove now unused _RAISE macro check to deal with MSVC 2017 15.8. r=froydnj
--HG--
extra : rebase_source : d93dbda28fff9cdbf0f6a908e0c1d59c152665e5
extra : source : b38403f36056d301321c128be96ee60d14739859
2018-08-17 01:27:29 +09:00
Mike Hommey f4f54e5aeb Bug 1482330 - Upgrade to Android NDK r17b and API level 16 (JB). r=snorp
We're currently using NDK r15c, which is rather old, and happens to come
with a buggy gold linker. Let's use a more recent NDK, with a fixed
linker.

Unfortunately, we're currently at NDK API level 9, which the newer NDK
doesn't provide for x86 anymore. But that corresponds to Gingerbread
(2.3), which we've long stopped supporting. On the SDK side, we already
dropped support of versions before Jelly Bean, so we can do the same on
the NDK side. That corresponds to API level 16. So let's just use that
as a baseline.

Another change in the newer NDK is that the target-name changed from
i386-linux-android to i686-linux-android, so adjust for that in the
android x86 mozconfigs.
2018-08-11 09:47:41 +09:00
Brian Hackett f6b8e6f81c Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
--HG--
extra : rebase_source : f4e2d9f8831cf41c19d592ce252e87161f32250b
2018-07-20 23:58:34 +00:00
Masatoshi Kimura cc03337492 Bug 1476597 - Stop using dynamic exception specification in mozalloc.h. r=froydnj
--HG--
extra : rebase_source : 48047a82e42dc7688fb3ed484d01794ccbd86763
2018-07-18 20:36:25 +09:00
Jacek Caban 505960071d Bug 1471352 - Don't export functions from gcc_throw.h in mingw builds. r=froydnj
MozReview-Commit-ID: D5HQWCN12oI

--HG--
extra : rebase_source : 890d816347162f54204df4dcd5c3297c917da867
2018-06-26 18:55:14 +02:00
Tom Ritter 799ec67a16 Bug 1448749 Resolve undefined references to '_imp__mozalloc_abort' in the MinGW build r=glandium
MozReview-Commit-ID: 5enjU5Xp8G9

--HG--
extra : rebase_source : 21e8f5aff8f3d6f26fd9127e0b30099031a587a7
2018-05-16 22:02:05 -05:00
Margareta Eliza Balazs adebb06ac1 Merge inbound to mozilla-central. a=merge 2018-03-28 00:48:11 +03:00
Carl Corcoran 6766b3d082 Bug 1448546: Adding sized operator delete overloads on Windows builds; r=froydnj
MozReview-Commit-ID: EzhNZEf0suT

--HG--
extra : rebase_source : 695258d519654c9f0f69dc8a1446f28136ae8273
extra : source : 013cfa5c5f358aa02784a8a20bf181d3751d0bbf
2018-03-27 14:42:17 +02:00
Nathan Froyd 3d6d46eaba Bug 1448030 - use SprintfLiteral in fillAbortMessage; r=glandium
The SprintfLiteral checker complains that:

  snprintf(msg, sizeof(msg), ...);

should be using SprintfLiteral instead.  Let's do that.
2018-03-27 10:51:32 -04:00
Nathan Froyd 9133c59dba Bug 1442325 - remove some dead preprocessor logic; r=glandium
We always compile with C++11 (er, C++14), so there's no need to include
clauses that suggest otherwise.
2018-03-02 07:06:08 -05:00
Mike Hommey 3e46ee7dc9 Bug 1417504 - Also wrap Heap{Alloc,ReAlloc,Free} when building without our allocator. r=njn
Bug 1280578 added some wrapping for the Win32 Heap* functions, mainly
for the rust static libraries that use them. Because pointer ownership
might cross the C++/Rust boundary, and because about:memory uses
malloc_usable_size/msize, we need both C++ and Rust to still use the
same heap on builds where our allocator is not enabled.

--HG--
extra : rebase_source : 37a25b376a02ea07c187fb161d2005141e783820
2017-12-19 14:46:23 +09:00
Gurzau Raul 91d3bc0100 Merge inbound to mozilla-central r=merge a=merge 2017-12-09 00:36:15 +02:00
Ryan VanderMeulen 01e424a4bc Bug 1423649 - Fix compiler errors that happen when building with VS2017 15.5. r=rillian 2017-12-08 10:40:08 -05:00
Sylvestre Ledru 5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Mike Hommey cd4d96f039 Bug 1424114 - Remove the string.h/cstring include in mozalloc.h. r=njn
While here, change the string.h include to cstring in mozalloc.cpp.

--HG--
extra : rebase_source : d60eac8b5fdb358b43eb32978d5d40a426d50648
2017-12-08 11:47:15 +09:00
Mike Hommey abab5abf88 Bug 1423803 - Turn mozilla::fallible into an alias for std::nothrow. r=njn
The std::nothrow variant of operator new is effectively a fallible
operator new. It is used in third party code.

The duplication with our own fallible operator new is unfortunate, and
we can reduce it by making one an alias of the other.

We keep the fallible library as a dummy on Android because bug 1423802
induces some linking problems.

--HG--
extra : rebase_source : d7b915aaafde40057e87b7ad4bbd82d348e4f12d
2017-12-07 11:32:29 +09:00
Mike Hommey 627d9acca4 Bug 1423461 - Report the right size to the OOM handler for moz_xcalloc. r=njn
--HG--
extra : rebase_source : 536f6504394b14a4968b24fbc719017111a428cf
2017-12-06 16:10:30 +09:00
Mike Hommey 33ca8ff779 Bug 1423461 - Use mozilla/Likely.h in mozalloc.cpp. r=njn
Back when mozalloc.cpp was written, mozilla/Likely.h didn't exist.

--HG--
extra : rebase_source : da3b4c8839a97e3ac2d40da158905ac38c088683
2017-12-06 16:05:08 +09:00
Mike Hommey a646756fb7 Bug 1423461 - Use noexcept in mozalloc.h on android. r=njn
Bug 1163171 removed support for building for android with GCC, and we
don't need to use throw() anymore. We can use the same code as for other
non-Windows platforms.

--HG--
extra : rebase_source : 9c2c2179a6d214096619ff0ae1d1a42912beda79
2017-12-06 11:38:59 +09:00
Mike Hommey 41a56e83c2 Bug 1423461 - Remove MOZALLOC_INLINE, and always use MOZ_ALWAYS_INLINE_EVEN_DEBUG. r=njn
MOZ_ALWAYS_INLINE_EVEN_DEBUG is always defined through
mozilla/Attributes.h, so the fallbacks are never used in practice. They
are just there from the old days when mozalloc.h didn't use
mozilla/Attributes.h.

--HG--
extra : rebase_source : 0d55068ab5fcec3f4bcafecd8c3ce371597f8cfe
2017-12-06 11:31:48 +09:00
Mike Hommey 3f1f5c9fc2 Bug 1423114 - Remove moz_xposix_memalign and moz_xvalloc. r=njn
They are both infallible wrappers of posix_memalign and valloc.
There is also moz_xmemalign, which wraps memalign, which is mostly
always available as of bug 1402647.

None of them are actually used, but it's still desirable to at least
have one infallible variant, so keep moz_xmemalign and remove the other
two.

While here, we actually make both memalign and moz_xmemalign always
available.

--HG--
extra : rebase_source : 1c3ca4b3e3310543145f3181dfa4e764be1d6ff8
2017-12-05 17:34:19 +09:00
Mike Hommey 4c95537eeb Bug 1423094 - Remove USE_STATIC_LIBS=True-related code in mozalloc. r=gps
--HG--
extra : rebase_source : 52a4df6d15f9aa5eb0479cef4e98e9e41eb5164c
2017-12-05 16:30:21 +09:00
Mike Hommey 8aa92edf03 Bug 1423094 - Remove mozalloc_staticruntime. r=gps
--HG--
extra : rebase_source : 3b6678d4b36e405b2acc18b8fd75b5db7d45bf4c
2017-12-05 15:39:39 +09:00
Narcis Beleuzu dfd58840d1 Backed out changeset 8a4050c7e0fd (bug 1423114) for bustages on memory/mozalloc/mozalloc.cpp r=backout on a CLOSED TREE 2017-12-06 00:27:11 +02:00
Mike Hommey a1947c3098 Bug 1423119 - Remove the sole use of MOZALLOC_HAVE_XMALLOC. r=erahm
When this was added, the xpcom glue was still a thing, and there was a
distinction between things that would build with mozalloc available and
others. There is no such distinction anymore. Anything that has access
to xpcom has access to infallible allocator functions.

--HG--
extra : rebase_source : 04bce114e940c53709275d0354ea7240df4a051e
2017-12-05 17:45:20 +09:00
Mike Hommey 5f1f0bbdc4 Bug 1423114 - Remove moz_xposix_memalign and moz_xvalloc. r=njn
They are both infallible wrappers of posix_memalign and valloc.
There is also moz_xmemalign, which wraps memalign, which is always
available as of bug 1402647.

None of them are actually used, but it's still desirable to at least
have one infallible variant, so keep moz_xmemalign and remove the other
two.

While here, we actually make moz_xmemalign always available, since
memalign is always available.

--HG--
extra : rebase_source : 17300bc03a715e5d36b4b687f22050622c1c70c8
2017-12-05 17:34:19 +09:00
Mike Hommey a5aef799e1 Bug 1423109 - Use MOZ_{BEGIN,END}_EXTERN_C in mozalloc.h. r=njn
--HG--
extra : rebase_source : 9d1c8c59b58273c1efe9a124e41eccc254600346
2017-12-05 17:04:45 +09:00
Mike Hommey 660ec9e47b Bug 1423109 - Remove Sun Pro compiler specific preprocessor directives from mozalloc.h. r=njn
As of bug 1255813, compiling with Sun Pro compiler is not supported.

--HG--
extra : rebase_source : 3c925ec389a5607047330f743d45f3c5eca7b7f8
2017-12-05 17:00:02 +09:00
Mike Hommey 1b2c8764a2 Bug 1423107 - Remove moz_posix_memalign. r=njn
--HG--
extra : rebase_source : 47e9db8d98082fbccdb80c5ac0ca21fff0c5c888
2017-12-05 16:52:34 +09:00
Nathan Froyd f51359bd19 Bug 1325632 - part 5 - ensure that we compile with -fno-sized-deallocation when possible; r=chmanchester
We currently turn off the C++14 sized-deallocation facility on MSVC, and
we'd like to ensure we do the same thing for clang and gcc.  To do so,
we add new functionality to moz.configure for checking and adding
compilation flags, similar to the facility for checking and adding
warning flags.  The newly added facility is then used to add
-fno-sized-deallocation to the compilation flags, when the option is
supported.

Once we do this, we can't define the sized deallocation functions in
mozalloc.h; the compiler will complain that we are using
-fno-sized-deallocation, yet defining these special functions that we'll
never use.  These functions were added for MinGW, where we needed to
compile with C++14 ahead of other platforms to be compatible with MSVC
headers.  But they're no longer necessary, though they would be if we
removed -fno-sized-deallocation; the compiler will complain if we do
that and we'll add them back at that point.
2017-11-15 14:53:16 -04:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Tom Ritter fdab21a20a Bug 1406197 Declare sized deallocators (that ignore the size) to correct a MinGW warning r=glandium
MozReview-Commit-ID: Dl4uu6evlbs

--HG--
extra : rebase_source : f9b04123b1f09a49155f0bb24704f9e11818ff5a
2017-10-10 13:16:10 -05:00
Nathan Froyd f8fda5a9b5 Bug 1396889 - don't warn about infinite recursion in mozalloc_abort; r=glandium
mozalloc_abort is not marked as a noreturn function on ARM, so clang
complains when abort calls mozalloc_abort, which calls MOZ_CRASH, which
calls abort().  We know this is OK, so just disable the warning.
2017-09-14 09:52:50 -04:00
Chris Manchester fab07bc443 Bug 1386876 - Replace all uses of NO_VISIBILITY_FLAGS with a template and remove NO_VISIBILITY_FLAGS. r=glandium
MozReview-Commit-ID: 194U1WMCAM0

--HG--
extra : rebase_source : 365b68b0a1772d238ae9b84966e53dcd1197fd85
2017-05-01 18:12:35 -07:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Nicholas Nethercote c419d5fa48 Bug 1389305 (attempt 2) - Add jemalloc_ptr_info() and moz_malloc_enclosing_size_of(). r=glandium.
--HG--
extra : rebase_source : 93a6cfcc916fb239581c2892f24b24c6fc65ac71
2017-09-01 11:52:23 +10:00
Sebastian Hengst 4310ea4600 Backed out changeset f232b5b1a0c7 (bug 1389305) for frequently failing GTest Jemalloc.PtrInfo on Linux opt. r=backout 2017-08-31 13:52:48 +02:00
Nicholas Nethercote 365285b831 Bug 1389305 - Add jemalloc_ptr_info() and moz_malloc_enclosing_size_of(). r=glandium.
jemalloc_ptr_info() gives info about any pointer, such as whether it's within a
live or free allocation, and if so, info about that allocation. It's useful for
debugging.

moz_malloc_enclosing_size_of() uses jemalloc_ptr_info() to measure the size of
an allocation from an interior pointer. It's useful for memory reporting,
especially for Rust code.

--HG--
extra : rebase_source : caa19cccf8c2d1f79cf004fe6a408775de5a7b22
2017-08-24 19:37:27 +10:00
Botond Ballo b93629ee1d Bug 1383919 - Use |noexcept| instead of an exception-specification in mozalloc.h. r=glandium
MozReview-Commit-ID: DwrE8cmZOQN

--HG--
extra : rebase_source : e45f35dd009a3a8a94f50afc55177976c532f16a
2017-07-24 19:19:07 -04:00
Petr Sumbera a393f2a6cf Bug 1375467 - Redefining abort() in C++ requires extern "C". r=glandium 2017-06-22 05:09:05 -07:00
Jeff Gilbert 58ae26fbc7 Bug 1376057 - Replace MSVC wrappers with std::exception::_Set_raise_handler. - r=froydnj
MozReview-Commit-ID: MG5c4bzDlI
2017-06-27 11:51:34 -07:00
Mike Hommey 0400284f88 Bug 1365194 - Make `extern "C"` part of MOZ_MEMORY_API and MOZ_JEMALLOC_API. r=njn
This avoids many additions of `extern "C"` in C++ code and will avoid
having to do the same to mozjemalloc once built as C++.

--HG--
extra : rebase_source : af55696262f40a9dd16a19c29edcb9bb307d4957
2017-05-16 18:46:02 +09:00
Carsten "Tomcat" Book 9c3f61e278 Backed out changeset b56224bf370d (bug 1365194) 2017-05-17 11:43:26 +02:00
Mike Hommey 2bd75405bc Bug 1365194 - Make `extern "C"` part of MOZ_MEMORY_API and MOZ_JEMALLOC_API. r=njn
This avoids many additions of `extern "C"` in C++ code and will avoid
having to do the same to mozjemalloc once built as C++.

--HG--
extra : rebase_source : af55696262f40a9dd16a19c29edcb9bb307d4957
2017-05-16 18:46:02 +09:00
Tom Ritter f8036e08d5 Bug 1332747 Change MOZ_ALWAYS_INLINE to MOZ_ALWAYS_INLINE_EVEN_DEBUG to fix MinGW Debug build r=froydnj
MozReview-Commit-ID: 7CkreJM1mHr

--HG--
extra : rebase_source : 8dc51c9c1b0e10bd7b40f3c6f65b2495dfe22cb1
2017-04-11 12:53:58 -05:00
Bevis Tseng 2a318e8c71 Bug 1332491 - Delete SelectorCacheKey synchronously. r=bz
1. The current asynchronous behavior is pointless, because we still remove the
   hashtable entry synchronously, which deletes the value, and it's the value
   we're using.
2. Trying to asynchronously delete the value is difficult, and not currently
   needed because we can't get a memory-pressure notification while we're using
   the value, and hence can't expire it from the expiration tracker.
   Note: we can't get this memory-pressure notification because the stage 2 of
   mozalloc_handle_oom() to reclaim memory when OOM is not implemented yet.
2017-03-13 14:37:19 +08:00