diff --git a/config/custom_scudo_config.h b/config/custom_scudo_config.h index 8fe8cbc68ca..b1b1d9a1dc0 100644 --- a/config/custom_scudo_config.h +++ b/config/custom_scudo_config.h @@ -220,6 +220,13 @@ struct AndroidLowMemoryConfig { #if defined(__ANDROID__) +#include + +#if defined(PAGE_SIZE) +// This is to guarantee that the getPageSizeCached() function is constexpr. +static_assert(getPageSizeCached() != 0, "getPageSizeCached() is zero"); +#endif + #if defined(SCUDO_LOW_MEMORY) typedef AndroidLowMemoryConfig Config; #else