diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-04-25 18:52:29 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-04-25 18:52:29 +0000 |
commit | 9937799b99e78f1bea24727ad03c72c68de9c9fd (patch) | |
tree | 0436c44894fe0dbf02e0084d037d0041723f3620 /compiler-rt/include | |
parent | 462b1827eb43892e9d64b46aca167d7886e52120 (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
Diffstat (limited to 'compiler-rt/include')
-rw-r--r-- | compiler-rt/include/sanitizer/scudo_interface.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/include/sanitizer/scudo_interface.h b/compiler-rt/include/sanitizer/scudo_interface.h index 25979fb23a7..be605f1d7fd 100644 --- a/compiler-rt/include/sanitizer/scudo_interface.h +++ b/compiler-rt/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 |