Bug 1141731 - Avoid problems caused by the inclusion of mozmemory.h in mozalloc.cpp by including mozmemory_wrap.h instead. r=njn
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 11 Mar 2015 08:27:22 +0900
changeset 232996 22aea188dac597f60c9182eb337240b16498fb69
parent 232976 172eb08eb39538431b585f871f1be762dcb2799c
child 232997 80555e0558a36842b4aee1ccbcfe59d7d84981c9
push id28399
push userryanvm@gmail.com
push dateWed, 11 Mar 2015 19:47:52 +0000
treeherdermozilla-central@30916c9ca768 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1141731
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1141731 - Avoid problems caused by the inclusion of mozmemory.h in mozalloc.cpp by including mozmemory_wrap.h instead. r=njn
memory/mozalloc/mozalloc.cpp
--- a/memory/mozalloc/mozalloc.cpp
+++ b/memory/mozalloc/mozalloc.cpp
@@ -12,17 +12,21 @@
 #if defined(_MT) && !defined(_DLL)
 #define MOZ_STATIC_RUNTIME
 #endif
 
 #if defined(MOZ_MEMORY) && !defined(MOZ_STATIC_RUNTIME)
 // mozalloc.cpp is part of the same library as mozmemory, thus MOZ_MEMORY_IMPL
 // is needed.
 #define MOZ_MEMORY_IMPL
-#include "mozmemory.h"
+#include "mozmemory_wrap.h"
+
+#if defined(XP_MACOSX)
+#include <malloc/malloc.h> // for malloc_size
+#endif
 
 // See mozmemory_wrap.h for more details. This file is part of libmozglue, so
 // it needs to use _impl suffixes. However, with libmozglue growing, this is
 // becoming cumbersome, so we will likely use a malloc.h wrapper of some sort
 // and allow the use of the functions without a _impl suffix.
 #define MALLOC_DECL(name, return_type, ...) \
   extern "C" MOZ_MEMORY_API return_type name ## _impl(__VA_ARGS__);
 #define MALLOC_FUNS MALLOC_FUNCS_MALLOC