aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2024-04-23 17:25:40 -0700
committerChristopher Ferris <cferris@google.com>2024-04-23 17:25:40 -0700
commite1bcc3ee4a3de65e97973ca91629d462b5e62be4 (patch)
tree8fa6d8639a07cb6677ffcd5811ec5a6d431d7d1b
parent33b4678f52527df4a470a9416fb2b08194ce253a (diff)
downloadjemalloc_new-main.tar.gz
Replace malloc_not_svelte with malloc_low_memory.HEADmastermain
The malloc_not_svelte variable name is confusing and makes the low memory config the default. Change this so that the default is the regular allocator, and that malloc_low_memory is used to enable the low memory allocator. Update blueprint rules so that the default config is not the low memory one. Test: Verified scudo config is used by default. Test: Verfified Android GO config uses the jemalloc low memory config. Change-Id: I5b34c6f65e50fc3556a31d5a5b72509f4ff9ae75
-rw-r--r--Android.bp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Android.bp b/Android.bp
index 59db8a3a..fb1a85c2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -92,30 +92,30 @@ common_c_local_includes = [
// 1 << XX is the maximum sized allocation that will be in the tcache.
android_common_cflags = [
- // Default some parameters to small values to minimize PSS.
- // These parameters will be overridden by android_product_variables
- // for non-svelte configs.
- "-DANDROID_NUM_ARENAS=1",
- // This value cannot go below 2.
- "-DANDROID_TCACHE_NSLOTS_SMALL_MAX=2",
- "-DANDROID_TCACHE_NSLOTS_LARGE=1",
+ // Default parameters for jemalloc config.
+ "-DANDROID_ENABLE_TCACHE",
+ "-DANDROID_LG_TCACHE_MAXCLASS_DEFAULT=16",
+ "-DANDROID_NUM_ARENAS=2",
+ "-DANDROID_TCACHE_NSLOTS_SMALL_MAX=8",
+ "-DANDROID_TCACHE_NSLOTS_LARGE=16",
]
android_product_variables = {
- // Only enable the tcache on non-svelte configurations, to save PSS.
- malloc_not_svelte: {
+ malloc_low_memory: {
+ // Parameters to minimize RSS.
cflags: [
- "-DANDROID_ENABLE_TCACHE",
- "-DANDROID_LG_TCACHE_MAXCLASS_DEFAULT=16",
+ // Disable the tcache on non-svelte configurations, to save PSS.
+ "-UANDROID_ENABLE_TCACHE",
"-UANDROID_NUM_ARENAS",
- "-DANDROID_NUM_ARENAS=2",
+ "-DANDROID_NUM_ARENAS=1",
+ // This value cannot go below 2.
"-UANDROID_TCACHE_NSLOTS_SMALL_MAX",
- "-DANDROID_TCACHE_NSLOTS_SMALL_MAX=8",
+ "-DANDROID_TCACHE_NSLOTS_SMALL_MAX=2",
"-UANDROID_TCACHE_NSLOTS_LARGE",
- "-DANDROID_TCACHE_NSLOTS_LARGE=16",
+ "-DANDROID_TCACHE_NSLOTS_LARGE=1",
],
},
}