summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-04-25 18:52:29 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-04-25 18:52:29 +0000
commitbc4072ffad7ecb03530b4bdf2da27fd49d29e607 (patch)
tree0061f6ff3b381134a4342259bea065fdcf442c65 /include
parent77cb99480a98ca2b2c30de28dc736d5b13ae67d6 (diff)
[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
Diffstat (limited to 'include')
-rw-r--r--include/sanitizer/scudo_interface.h5
1 files changed, 5 insertions, 0 deletions
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