[asan] Revert r176255, r176264.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 1 Mar 2013 09:33:05 +0000 (09:33 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 1 Mar 2013 09:33:05 +0000 (09:33 +0000)
New allocator has 1.5x memory overhead of the old one.

llvm-svn: 176340

compiler-rt/lib/asan/asan_allocator.h
compiler-rt/lib/asan/tests/asan_test.cc

index 9c548232f5fecd5b5ac57049d142e0f3cdcfbdfc..9ba254245058757190c0170534e8c118673ae411 100644 (file)
@@ -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
index 4a766d7a27282fc4b8eedf2c49309ebbd0ffc79f..1096c2ee58b3a58f1514e9be847e19fa2518ef1c 100644 (file)
@@ -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);
   }
 }