Bug 727202 - Wrap malloc and free to use jemalloc in GeckoAppShell.{allocate,free}DirectBuffer. r=blassey
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 16 Feb 2012 09:02:25 +0100
changeset 89875 7e90fe61000f2e6045fd6656af83497093092cb7
parent 89874 061557e27b59e3c2052790e8c7fec22a24862861
child 89876 a84061b8c7c96ba9fa37551e25021d33cb748c21
push idunknown
push userunknown
push dateunknown
reviewersblassey
bugs727202
milestone13.0a1
Bug 727202 - Wrap malloc and free to use jemalloc in GeckoAppShell.{allocate,free}DirectBuffer. r=blassey
mozglue/android/nsGeckoUtils.cpp
--- a/mozglue/android/nsGeckoUtils.cpp
+++ b/mozglue/android/nsGeckoUtils.cpp
@@ -31,16 +31,19 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <jni.h>
+// Wrap malloc and free to use jemalloc
+#define malloc __wrap_malloc
+#define free __wrap_free
 #include <stdlib.h>
 
 extern "C"
 __attribute__ ((visibility("default")))
 void JNICALL
 Java_org_mozilla_gecko_GeckoAppShell_putenv(JNIEnv *jenv, jclass, jstring map)
 {
     const char* str;