Bug 1365191 - Remove #if 0 sections in mozjemalloc. r?njn draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 11 May 2017 17:23:02 +0900
changeset 578669 ddea2ee237e55db891acb79842f56c228d1bcdc8
parent 578668 863ba2a8d45f34c8ca7469d02af3a91b20eae0e8
child 578670 5ea30f5ac177f881a8242b729c9a0fe814ab3f81
push id59012
push userbmo:mh+mozilla@glandium.org
push dateTue, 16 May 2017 09:18:36 +0000
reviewersnjn
bugs1365191
milestone55.0a1
Bug 1365191 - Remove #if 0 sections in mozjemalloc. r?njn
memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -182,19 +182,16 @@
  * MALLOC_VALIDATE causes malloc_usable_size() to perform some pointer
  * validation.  There are many possible errors that validation does not even
  * attempt to detect.
  */
 #define MALLOC_VALIDATE
 
 #if defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
 #define	_GNU_SOURCE /* For mremap(2). */
-#if 0 /* Enable in order to test decommit code on Linux. */
-#  define MALLOC_DECOMMIT
-#endif
 #endif
 
 #include <sys/types.h>
 
 #include <errno.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <stdarg.h>
@@ -441,56 +438,16 @@ static pthread_key_t tlsIndex;
 /* Minimum alignment of non-tiny allocations is 2^QUANTUM_2POW_MIN bytes. */
 #  define QUANTUM_2POW_MIN      4
 #if defined(_WIN64) || defined(__LP64__)
 #  define SIZEOF_PTR_2POW       3
 #else
 #  define SIZEOF_PTR_2POW       2
 #endif
 #define PIC
-#if 0
-#ifdef __i386__
-#  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	2
-#  define CPU_SPINWAIT		__asm__ volatile("pause")
-#endif
-#ifdef __ia64__
-#  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	3
-#endif
-#ifdef __alpha__
-#  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	3
-#  define NO_TLS
-#endif
-#if defined(__sparc__) && defined(__arch64__)
-#  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	3
-#  define NO_TLS
-#endif
-#ifdef __amd64__
-#  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	3
-#  define CPU_SPINWAIT		__asm__ volatile("pause")
-#endif
-#ifdef __arm__
-#  define QUANTUM_2POW_MIN	3
-#  define SIZEOF_PTR_2POW	2
-#  define NO_TLS
-#endif
-#ifdef __mips__
-#  define QUANTUM_2POW_MIN	3
-#  define SIZEOF_PTR_2POW	2
-#  define NO_TLS
-#endif
-#ifdef __powerpc__
-#  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	2
-#endif
-#endif
 
 #define	SIZEOF_PTR		(1U << SIZEOF_PTR_2POW)
 
 /* sizeof(int) == (1U << SIZEOF_INT_2POW). */
 #ifndef SIZEOF_INT_2POW
 #  define SIZEOF_INT_2POW	2
 #endif