Bug 1229395 - Part 1 - Unbreak MOZ_NATIVE_JEMALLOC after bug 1141079. r=glandium, a=lizzard
authorJan Beich <jbeich@FreeBSD.org>
Tue, 01 Dec 2015 16:39:33 +0000
changeset 317094 edf64a97e4ea3ddf53484f1363b6a2e041cc5a48
parent 317093 5d4452aacaeda4b7c0cacbc04ceb07e9f64bf2ba
child 317095 9e520c4a75126044ab99e028aa58d32cdf28567f
push id8643
push usermconley@mozilla.com
push dateTue, 22 Dec 2015 18:28:20 +0000
reviewersglandium, lizzard
bugs1229395, 1141079
milestone44.0a2
Bug 1229395 - Part 1 - Unbreak MOZ_NATIVE_JEMALLOC after bug 1141079. r=glandium, a=lizzard
memory/build/jemalloc_config.cpp
--- a/memory/build/jemalloc_config.cpp
+++ b/memory/build/jemalloc_config.cpp
@@ -6,18 +6,27 @@
 
 #define MOZ_JEMALLOC_IMPL
 
 /* mozmemory_wrap.h needs to be included before MFBT headers */
 #include "mozmemory_wrap.h"
 #include <mozilla/Assertions.h>
 #include "mozilla/Types.h"
 
+#if defined(MOZ_NATIVE_JEMALLOC)
+MOZ_IMPORT_API int
+je_(mallctl)(const char*, void*, size_t*, void*, size_t);
+MOZ_IMPORT_API int
+je_(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
+MOZ_IMPORT_API int
+je_(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+#else
 #define DLLEXPORT
 #include "jemalloc/jemalloc.h"
+#endif
 
 #ifdef XP_WIN
 #include <windows.h>
 #endif
 #ifdef XP_DARWIN
 #include <sys/mman.h>
 #endif