[llvm-commits] [compiler-rt] r172531 - /compiler-rt/trunk/lib/asan/asan_allocator.h

Kostya Serebryany kcc at google.com
Tue Jan 15 05:57:39 PST 2013


Author: kcc
Date: Tue Jan 15 07:57:39 2013
New Revision: 172531

URL: http://llvm.org/viewvc/llvm-project?rev=172531&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/lib/asan/asan_allocator.h

Modified: compiler-rt/trunk/lib/asan/asan_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.h?rev=172531&r1=172530&r2=172531&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.h (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.h Tue Jan 15 07:57:39 2013
@@ -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 {
 





More information about the llvm-commits mailing list