From f5d8c90f57f7cca81fd35bb961c7f4df6370a344 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 1 Mar 2013 09:33:05 +0000 Subject: [PATCH] [asan] Revert r176255, r176264. New allocator has 1.5x memory overhead of the old one. llvm-svn: 176340 --- compiler-rt/lib/asan/asan_allocator.h | 2 +- compiler-rt/lib/asan/tests/asan_test.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h index 9c548232f5fe..9ba254245058 100644 --- a/compiler-rt/lib/asan/asan_allocator.h +++ b/compiler-rt/lib/asan/asan_allocator.h @@ -24,7 +24,7 @@ // will co-exist in the source base for a while. The actual allocator is chosen // at build time by redefining this macro. #ifndef ASAN_ALLOCATOR_VERSION -# if ASAN_LINUX || ASAN_MAC || ASAN_WINDOWS +# if (ASAN_LINUX && !ASAN_ANDROID) || ASAN_MAC || ASAN_WINDOWS # define ASAN_ALLOCATOR_VERSION 2 # else # define ASAN_ALLOCATOR_VERSION 1 diff --git a/compiler-rt/lib/asan/tests/asan_test.cc b/compiler-rt/lib/asan/tests/asan_test.cc index 4a766d7a2728..1096c2ee58b3 100644 --- a/compiler-rt/lib/asan/tests/asan_test.cc +++ b/compiler-rt/lib/asan/tests/asan_test.cc @@ -319,8 +319,7 @@ static void TestLargeMalloc(size_t size) { } TEST(AddressSanitizer, LargeMallocTest) { - const int max_size = (ASAN_LOW_MEMORY) ? 1 << 26 : 1 << 28; - for (int i = 113; i < max_size; i = i * 2 + 13) { + for (int i = 113; i < (1 << 28); i = i * 2 + 13) { TestLargeMalloc(i); } } -- 2.34.1