gecko-dev/toolkit/library
Mike Hommey 0fc58f5ee3 Bug 1514122 - Make rust code use mozjemalloc directly. r=froydnj
Until rust 1.28, there was no stable way to change the allocator used by
rust code. In bug 1280578, we hooked HeadAlloc/HeapFree/HeapRealloc,
that the default rust system allocator uses. On other platforms, rust
code just ended up using malloc/free/realloc like everything else.

As of rust 1.28, though, it is now possible to use the GlobalAlloc trait
and the #[global_allocator] attribute to set an allocator. On Windows,
this can allow us to hook mozjemalloc directly, rather than using an
indirection through HeapAlloc/etc. (which require an extra call to
GetProcessHeap), so let's do this. On other platforms, this just ends up
doing the same thing as the default rust system allocator (except for
the memalign limit on 32-bits platforms).

We still need the HeapAlloc/etc. hooks for some C++ code using it, though.

Another benefit is that the HeapAlloc GlobalAlloc implementation needs
to do its own memalign, which it does by overallocating and aligning
manually. We obviously don't need to do this when we using
memalign/_aligned_malloc directly.

Differential Revision: https://phabricator.services.mozilla.com/D14820

--HG--
extra : moz-landing-system : lando
2018-12-19 01:47:40 +00:00
..
dummydll Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
gtest Bug 1499196 - Always use the topobjdir to output rust library dependencies. r=ted,firefox-build-system-reviewers 2018-10-18 10:40:32 +00:00
rust Bug 1514122 - Make rust code use mozjemalloc directly. r=froydnj 2018-12-19 01:47:40 +00:00
dependentlibs.py Bug 1471293 - Support using llvm-objdump in dependentlibs.py r=glandium 2018-06-26 15:15:19 +02:00
gecko.natvis bug 1408502 - embed natvis info for Gecko types in our PDB files. r=froydnj 2018-03-14 14:07:15 -04:00
libxul.so-gdb.py.in
Makefile.in Bug 1482299 - Replace libxul.mk with OBJDIR_PP_FILES. r=ted,firefox-build-system-reviewers 2018-08-15 14:04:00 +00:00
moz.build Bug 1513798 - Expose the linker kind to moz.build. r=nalexander 2018-12-18 10:50:15 +09:00
nsDllMain.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
StaticXULComponents.ld Bug 1471132 - Change how static xpcom components are linked. r=froydnj 2018-06-26 14:40:51 +09:00
symverscript.in
xulrunner.rc