[asan] add a flag poison_heap to allow better allocator benchmarking, implemenet malloc_stats() on Linux
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170685 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_flags.h b/lib/asan/asan_flags.h
index ded2b24..8306170 100644
--- a/lib/asan/asan_flags.h
+++ b/lib/asan/asan_flags.h
@@ -99,6 +99,9 @@
bool fast_unwind_on_fatal;
// Use fast (frame-pointer-based) unwinder on malloc/free (if available).
bool fast_unwind_on_malloc;
+ // Poison (or not) the heap memory on [de]allocation. Zero value is useful
+ // for benchmarking the allocator or instrumentator.
+ bool poison_heap;
};
Flags *flags();