From bc4072ffad7ecb03530b4bdf2da27fd49d29e607 Mon Sep 17 00:00:00 2001 From: Kostya Kortchinsky Date: Wed, 25 Apr 2018 18:52:29 +0000 Subject: [scudo] Adding an interface function to print allocator stats Summary: This adds `__scudo_print_stats` as an interface function to display the Primary and Secondary allocator statistics for Scudo. Reviewers: alekseyshl, flowerhack Reviewed By: alekseyshl Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D46016 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330857 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/sanitizer/scudo_interface.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/sanitizer/scudo_interface.h b/include/sanitizer/scudo_interface.h index 25979fb23..be605f1d7 100644 --- a/include/sanitizer/scudo_interface.h +++ b/include/sanitizer/scudo_interface.h @@ -27,6 +27,11 @@ extern "C" { // can be removed by setting LimitMb to 0. This function's parameters should // be fully trusted to avoid security mishaps. void __scudo_set_rss_limit(size_t LimitMb, int HardLimit); + + // This function outputs various allocator statistics for both the Primary + // and Secondary allocators, including memory usage, number of allocations + // and deallocations. + void __scudo_print_stats(void); #ifdef __cplusplus } // extern "C" #endif -- cgit v1.2.3