From e2a8241f844a4fea258aa3cdf43db0a8ba2b9cd5 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 3 Apr 2015 12:59:39 +0000 Subject: [PATCH] [sancov] Shrink pc array on Android back to 2**24. Address space is a lot more constrained on 32-bit Android compared to Linux. llvm-svn: 234010 --- compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc index 4b976fc344bf..cfd9e7e17f46 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc @@ -109,7 +109,8 @@ class CoverageData { // Maximal size pc array may ever grow. // We MmapNoReserve this space to ensure that the array is contiguous. - static const uptr kPcArrayMaxSize = FIRST_32_SECOND_64(1 << 26, 1 << 27); + static const uptr kPcArrayMaxSize = + FIRST_32_SECOND_64(1 << (SANITIZER_ANDROID ? 24 : 26), 1 << 27); // The amount file mapping for the pc array is grown by. static const uptr kPcArrayMmapSize = 64 * 1024; -- 2.34.1