[asan] properly define ASAN_LOW_MEMORY. Due to a mistake it has been always true causing redzone and quarantine sizes to be smaller than it was some time before (and out of sync with the documentation). Also make one test less greedy

llvm-svn: 171052
This commit is contained in:
Kostya Serebryany 2012-12-25 07:17:17 +00:00
parent d192517cf3
commit 181f504d82
2 changed files with 5 additions and 3 deletions

View File

@ -83,9 +83,9 @@
// If set, values like allocator chunk size, as well as defaults for some flags
// will be changed towards less memory overhead.
#ifndef ASAN_LOW_MEMORY
# ifdef ASAN_ANDROID
#if SANITIZER_WORDSIZE == 32
# define ASAN_LOW_MEMORY 1
# else
#else
# define ASAN_LOW_MEMORY 0
# endif
#endif

View File

@ -508,7 +508,7 @@ TEST(AddressSanitizerInterface, GetFreeBytesTest) {
EXPECT_DEATH(DoLargeMallocForGetFreeBytesTestAndDie(), "double-free");
}
static const size_t kManyThreadsMallocSizes[] = {5, 1UL<<10, 1UL<<20, 357};
static const size_t kManyThreadsMallocSizes[] = {5, 1UL<<10, 1UL<<14, 357};
static const size_t kManyThreadsIterations = 250;
static const size_t kManyThreadsNumThreads =
(SANITIZER_WORDSIZE == 32) ? 40 : 200;
@ -520,6 +520,8 @@ void *ManyThreadsWithStatsWorker(void *arg) {
free(Ident(malloc(kManyThreadsMallocSizes[size_index])));
}
}
// Just one large allocation.
free(Ident(malloc(1 << 20)));
return 0;
}