[llvm-commits] [compiler-rt] r172213 - /compiler-rt/trunk/lib/sanitizer_common/tests/standalone_malloc_test.cc
Dmitry Vyukov
dvyukov at google.com
Fri Jan 11 08:22:53 PST 2013
Author: dvyukov
Date: Fri Jan 11 10:22:53 2013
New Revision: 172213
URL: http://llvm.org/viewvc/llvm-project?rev=172213&view=rev
Log:
asan: improve allocator benchmark
Modified:
compiler-rt/trunk/lib/sanitizer_common/tests/standalone_malloc_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/standalone_malloc_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/standalone_malloc_test.cc?rev=172213&r1=172212&r2=172213&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/standalone_malloc_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/standalone_malloc_test.cc Fri Jan 11 10:22:53 2013
@@ -34,6 +34,7 @@
if (allocated.empty()) continue;
size_t slot = i % allocated.size();
char *p = allocated[slot].first;
+ p[0] = 0; // emulate last user touch of the block
size_t size = allocated[slot].second;
total_freed += size;
swap(allocated[slot], allocated.back());
More information about the llvm-commits
mailing list