summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp13
-rw-r--r--config/config_build_check.cpp7
-rw-r--r--config/custom_scudo_config.h6
3 files changed, 11 insertions, 15 deletions
diff --git a/Android.bp b/Android.bp
index 2067b271e72..88435b917bc 100644
--- a/Android.bp
+++ b/Android.bp
@@ -71,9 +71,6 @@ cc_defaults {
cflags: [
// Use a custom Android configuration.
"-DSCUDO_USE_CUSTOM_CONFIG",
-
- // Enable the svelte config by default.
- "-DSVELTE_ENABLED",
],
include_dirs: [
@@ -81,8 +78,8 @@ cc_defaults {
],
product_variables: {
- malloc_not_svelte: {
- cflags: ["-USVELTE_ENABLED"],
+ malloc_low_memory: {
+ cflags: ["-DSCUDO_LOW_MEMORY"],
},
},
}
@@ -347,15 +344,13 @@ cc_defaults {
host_supported: true,
srcs: ["config/config_build_check.cpp"],
- cflags: ["-DSVELTE_CHECK"],
-
include_dirs: [
"external/scudo/standalone",
],
product_variables: {
- malloc_not_svelte: {
- cflags: ["-USVELTE_CHECK"],
+ malloc_low_memory: {
+ cflags: ["-DSCUDO_LOW_MEMORY_CHECK"],
},
},
}
diff --git a/config/config_build_check.cpp b/config/config_build_check.cpp
index 00eff3c0dc0..3f97fc7514e 100644
--- a/config/config_build_check.cpp
+++ b/config/config_build_check.cpp
@@ -33,9 +33,10 @@
#include "allocator_config.h"
-#if defined(SVELTE_CHECK)
-static_assert(std::is_same<scudo::Config, scudo::AndroidSvelteConfig>() == true,
- "Svelte is enabled, but AndroidSvelteConfig is not the default");
+#if defined(SCUDO_LOW_MEMORY_CHECK)
+static_assert(
+ std::is_same<scudo::Config, scudo::AndroidLowMemoryConfig>() == true,
+ "Low Memory is enabled, but AndroidLowMemoryConfig is not the default");
#else
static_assert(std::is_same<scudo::Config, scudo::AndroidNormalConfig>() == true,
"Not using AndrodNormalConfig as the default");
diff --git a/config/custom_scudo_config.h b/config/custom_scudo_config.h
index 26f590e3c25..a0fa59230ce 100644
--- a/config/custom_scudo_config.h
+++ b/config/custom_scudo_config.h
@@ -133,7 +133,7 @@ struct AndroidNormalConfig {
template <typename Config> using SecondaryT = MapAllocator<Config>;
};
-struct AndroidSvelteConfig {
+struct AndroidLowMemoryConfig {
#if defined(__aarch64__)
static const bool MaySupportMemoryTagging = true;
#else
@@ -173,8 +173,8 @@ struct AndroidSvelteConfig {
template <typename Config> using SecondaryT = MapAllocator<Config>;
};
-#if defined(SVELTE_ENABLED)
-typedef AndroidSvelteConfig Config;
+#if defined(SCUDO_LOW_MEMORY)
+typedef AndroidLowMemoryConfig Config;
#else
typedef AndroidNormalConfig Config;
#endif