From d8b1f782961e8492268df3e46b8090365dbe1279 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 15 Jan 2013 13:57:39 +0000 Subject: [PATCH] [asan] enable asan_allocator2 by default on Linux. Will enable it on other platforms and remove the old one later, after additional testing. The new allocator is much faster and uses less memory llvm-svn: 172531 --- compiler-rt/lib/asan/asan_allocator.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h index 488a0c690658..cca24edad81f 100644 --- a/compiler-rt/lib/asan/asan_allocator.h +++ b/compiler-rt/lib/asan/asan_allocator.h @@ -23,7 +23,13 @@ // to a new one (version 2). The change is quite intrusive so both allocators // will co-exist in the source base for a while. The actual allocator is chosen // at build time by redefining this macro. -#define ASAN_ALLOCATOR_VERSION 1 +#ifndef ASAN_ALLOCATOR_VERSION +# if ASAN_LINUX && !ASAN_ANDROID +# define ASAN_ALLOCATOR_VERSION 2 +# else +# define ASAN_ALLOCATOR_VERSION 1 +# endif +#endif // ASAN_ALLOCATOR_VERSION namespace __asan {