715
|
1 |
|
|
2 |
# HG changeset patch
|
|
3 |
# User Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
|
|
4 |
# Date 1390512871 18000
|
|
5 |
# Node ID feaf8bd56a82749f5d0d8869b7c0a1c01e300362
|
|
6 |
# Parent 2a082f03cd1d64c8bfff9641284f2dc23617f806
|
|
7 |
Bug 963028 - AArch64 support for jemalloc. r=froydnj
|
|
8 |
|
|
9 |
diff --git a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
|
|
10 |
--- a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
|
|
11 |
+++ b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
|
|
12 |
@@ -283,16 +283,19 @@ static const bool config_ivsalloc =
|
|
13 |
# define LG_QUANTUM 4
|
|
14 |
# endif
|
|
15 |
# ifdef __SH4__
|
|
16 |
# define LG_QUANTUM 4
|
|
17 |
# endif
|
|
18 |
# ifdef __tile__
|
|
19 |
# define LG_QUANTUM 4
|
|
20 |
# endif
|
|
21 |
+# ifdef __aarch64__
|
|
22 |
+# define LG_QUANTUM 4
|
|
23 |
+# endif
|
|
24 |
# ifndef LG_QUANTUM
|
|
25 |
# error "No LG_QUANTUM definition for architecture; specify via CPPFLAGS"
|
|
26 |
# endif
|
|
27 |
#endif
|
|
28 |
|
|
29 |
#define QUANTUM ((size_t)(1U << LG_QUANTUM))
|
|
30 |
#define QUANTUM_MASK (QUANTUM - 1)
|
|
31 |
|
|
32 |
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
|
|
33 |
--- a/memory/mozjemalloc/jemalloc.c
|
|
34 |
+++ b/memory/mozjemalloc/jemalloc.c
|
|
35 |
@@ -1097,17 +1097,17 @@ static unsigned ncpus;
|
|
36 |
/*
|
|
37 |
* VM page size. It must divide the runtime CPU page size or the code
|
|
38 |
* will abort.
|
|
39 |
* Platform specific page size conditions copied from js/public/HeapAPI.h
|
|
40 |
*/
|
|
41 |
#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
|
|
42 |
(defined(__sparc) || defined(__sparcv9) || defined(__ia64))
|
|
43 |
#define pagesize_2pow ((size_t) 13)
|
|
44 |
-#elif defined(__powerpc64__)
|
|
45 |
+#elif defined(__powerpc64__) || defined(__aarch64__)
|
|
46 |
#define pagesize_2pow ((size_t) 16)
|
|
47 |
#else
|
|
48 |
#define pagesize_2pow ((size_t) 12)
|
|
49 |
#endif
|
|
50 |
#define pagesize ((size_t) 1 << pagesize_2pow)
|
|
51 |
#define pagesize_mask (pagesize - 1)
|
|
52 |
|
|
53 |
/* Various quantum-related settings. */
|
|
54 |
|