Bug 616061 - Disable TLS in jemalloc on Android, r=mwu a=blassey
authorVladimir Vukicevic <vladimir@pobox.com>
Tue, 25 Jan 2011 15:22:45 -0500
changeset 61285 0fb025a8495820a070fa3b43ff44bfad2e68d54a
parent 61284 7864ae3b2a0e9561147bcfe2be6ab43590312842
child 61286 2f104bf64adf2f011ed4aa2e2f642fda952f620b
push id18292
push usereakhgari@mozilla.com
push dateTue, 25 Jan 2011 20:23:34 +0000
treeherdermozilla-central@0fb025a84958 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu, blassey
bugs616061
milestone2.0b10pre
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 616061 - Disable TLS in jemalloc on Android, r=mwu a=blassey
memory/jemalloc/jemalloc.c
--- a/memory/jemalloc/jemalloc.c
+++ b/memory/jemalloc/jemalloc.c
@@ -91,16 +91,21 @@
  *           in the associated arena chunk header maps.
  *
  *   Huge : Each allocation is backed by a dedicated contiguous set of chunks.
  *          Metadata are stored in a separate red-black tree.
  *
  *******************************************************************************
  */
 
+#ifdef MOZ_MEMORY_ANDROID
+#define NO_TLS
+#define _pthread_self() pthread_self()
+#endif
+
 /*
  * MALLOC_PRODUCTION disables assertions and statistics gathering.  It also
  * defaults the A and J runtime options to off.  These settings are appropriate
  * for production systems.
  */
 #ifndef MOZ_MEMORY_DEBUG
 #  define	MALLOC_PRODUCTION
 #endif