aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/chunk.h4
-rw-r--r--include/jemalloc/internal/tcache.h12
2 files changed, 12 insertions, 4 deletions
diff --git a/include/jemalloc/internal/chunk.h b/include/jemalloc/internal/chunk.h
index 47bbccd..f3bfbe0 100644
--- a/include/jemalloc/internal/chunk.h
+++ b/include/jemalloc/internal/chunk.h
@@ -5,11 +5,7 @@
* Size and alignment of memory chunks that are allocated by the OS's virtual
* memory system.
*/
-#if defined(__ANDROID__)
-#define LG_CHUNK_DEFAULT 20
-#else
#define LG_CHUNK_DEFAULT 22
-#endif
/* Return the chunk address for allocation address a. */
#define CHUNK_ADDR2BASE(a) \
diff --git a/include/jemalloc/internal/tcache.h b/include/jemalloc/internal/tcache.h
index c0d48b9..6712341 100644
--- a/include/jemalloc/internal/tcache.h
+++ b/include/jemalloc/internal/tcache.h
@@ -22,13 +22,25 @@ typedef struct tcache_s tcache_t;
*
* This constant must be an even number.
*/
+#if defined(ANDROID_TCACHE_NSLOTS_SMALL_MAX)
+#define TCACHE_NSLOTS_SMALL_MAX ANDROID_TCACHE_NSLOTS_SMALL_MAX
+#else
#define TCACHE_NSLOTS_SMALL_MAX 200
+#endif
/* Number of cache slots for large size classes. */
+#if defined(ANDROID_TCACHE_NSLOTS_LARGE)
+#define TCACHE_NSLOTS_LARGE ANDROID_TCACHE_NSLOTS_LARGE
+#else
#define TCACHE_NSLOTS_LARGE 20
+#endif
/* (1U << opt_lg_tcache_max) is used to compute tcache_maxclass. */
+#if defined(ANDROID_LG_TCACHE_MAXCLASS_DEFAULT)
+#define LG_TCACHE_MAXCLASS_DEFAULT ANDROID_LG_TCACHE_MAXCLASS_DEFAULT
+#else
#define LG_TCACHE_MAXCLASS_DEFAULT 15
+#endif
/*
* TCACHE_GC_SWEEP is the approximate number of allocation events between