[scudo][standalone] Reduce Android region sizes to 128MB

Summary:
Unity is making irresponsible assumptions as to how clumped up memory
should be. With larger regions, we break those, resulting in errors
like:

"Using memoryadresses from more that 16GB of memory"

This is unfortunately one of those situations where we have to bend to
existing code because we doubt it's going to change any time soon.

128MB should be enough, but we could be flirting with OOMs in the
higher class sizes.

Reviewers: cferris, eugenis, hctim, morehouse, pcc

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D73143

GitOrigin-RevId: 990acd450cf198cc6a82a28e011fa602e44512ad
diff --git a/allocator_config.h b/allocator_config.h
index 39c962f..1ad0405 100644
--- a/allocator_config.h
+++ b/allocator_config.h
@@ -39,8 +39,8 @@
 struct AndroidConfig {
   using SizeClassMap = AndroidSizeClassMap;
 #if SCUDO_CAN_USE_PRIMARY64
-  // 1GB regions
-  typedef SizeClassAllocator64<SizeClassMap, 30U,
+  // 128MB regions
+  typedef SizeClassAllocator64<SizeClassMap, 27U,
                                /*MaySupportMemoryTagging=*/true>
       Primary;
 #else
@@ -55,8 +55,8 @@
 struct AndroidSvelteConfig {
   using SizeClassMap = SvelteSizeClassMap;
 #if SCUDO_CAN_USE_PRIMARY64
-  // 512MB regions
-  typedef SizeClassAllocator64<SizeClassMap, 29U> Primary;
+  // 128MB regions
+  typedef SizeClassAllocator64<SizeClassMap, 27U> Primary;
 #else
   // 64KB regions
   typedef SizeClassAllocator32<SizeClassMap, 16U> Primary;