diff --git a/compiler-rt/lib/lsan/lsan_allocator.cpp b/compiler-rt/lib/lsan/lsan_allocator.cpp index a436d9c07ac6c..110c1cfc3bf92 100644 --- a/compiler-rt/lib/lsan/lsan_allocator.cpp +++ b/compiler-rt/lib/lsan/lsan_allocator.cpp @@ -28,7 +28,7 @@ extern "C" void *memset(void *ptr, int value, uptr num); namespace __lsan { #if defined(__i386__) || defined(__arm__) static const uptr kMaxAllowedMallocSize = 1ULL << 30; -#elif defined(__mips64) || defined(__aarch64__) +#elif defined(__mips64) static const uptr kMaxAllowedMallocSize = 4ULL << 30; #else static const uptr kMaxAllowedMallocSize = 1ULL << 40; diff --git a/compiler-rt/lib/msan/msan_allocator.cpp b/compiler-rt/lib/msan/msan_allocator.cpp index 532657f73590a..090529dfae787 100644 --- a/compiler-rt/lib/msan/msan_allocator.cpp +++ b/compiler-rt/lib/msan/msan_allocator.cpp @@ -145,7 +145,7 @@ struct AP32 { }; using PrimaryAllocator = SizeClassAllocator32; #elif defined(__aarch64__) -const uptr kMaxAllowedMallocSize = 8UL << 30; +const uptr kMaxAllowedMallocSize = 1UL << 40; struct AP64 { static const uptr kSpaceBeg = 0xE00000000000ULL;