diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-07 23:14:23 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-07 23:14:23 +0000 |
commit | 3fd49b0c0bc8410604521d097e01408b351736e7 (patch) | |
tree | 6b5bf6fe73d6621b9e2f398896b213e793adf226 | |
parent | f1f33365fd141e6ce94dab2649edad9c99fd2bcc (diff) | |
parent | e85262349efb3a2b33172daa190aeaeead294abf (diff) | |
download | scudo-sdk-release.tar.gz |
Snap for 11812660 from e85262349efb3a2b33172daa190aeaeead294abf to sdk-releasesdk-release
Change-Id: Ia0764b72fb0f5959e12a75ed66c0d8b337855f6e
-rw-r--r-- | Android.bp | 13 | ||||
-rw-r--r-- | config/config_build_check.cpp | 7 | ||||
-rw-r--r-- | config/custom_scudo_config.h | 6 |
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 |