# HG changeset patch # User Marcin Juszkiewicz # Date 1390512871 18000 # Node ID feaf8bd56a82749f5d0d8869b7c0a1c01e300362 # Parent 2a082f03cd1d64c8bfff9641284f2dc23617f806 Bug 963028 - AArch64 support for jemalloc. r=froydnj diff --git a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in --- a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in +++ b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in @@ -283,16 +283,19 @@ static const bool config_ivsalloc = # define LG_QUANTUM 4 # endif # ifdef __SH4__ # define LG_QUANTUM 4 # endif # ifdef __tile__ # define LG_QUANTUM 4 # endif +# ifdef __aarch64__ +# define LG_QUANTUM 4 +# endif # ifndef LG_QUANTUM # error "No LG_QUANTUM definition for architecture; specify via CPPFLAGS" # endif #endif #define QUANTUM ((size_t)(1U << LG_QUANTUM)) #define QUANTUM_MASK (QUANTUM - 1) diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -1097,17 +1097,17 @@ static unsigned ncpus; /* * VM page size. It must divide the runtime CPU page size or the code * will abort. * Platform specific page size conditions copied from js/public/HeapAPI.h */ #if (defined(SOLARIS) || defined(__FreeBSD__)) && \ (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) #define pagesize_2pow ((size_t) 13) -#elif defined(__powerpc64__) +#elif defined(__powerpc64__) || defined(__aarch64__) #define pagesize_2pow ((size_t) 16) #else #define pagesize_2pow ((size_t) 12) #endif #define pagesize ((size_t) 1 << pagesize_2pow) #define pagesize_mask (pagesize - 1) /* Various quantum-related settings. */