forked from OSchip/llvm-project
6f00f3b56e
Summary: Partners have requested the ability to configure more parts of Scudo at runtime, notably the Secondary cache options (maximum number of blocks cached, maximum size) as well as the TSD registry options (the maximum number of TSDs in use). This CL adds a few more Scudo specific `mallopt` parameters that are passed down to the various subcomponents of the Combined allocator. - `M_CACHE_COUNT_MAX`: sets the maximum number of Secondary cached items - `M_CACHE_SIZE_MAX`: sets the maximum size of a cacheable item in the Secondary - `M_TSDS_COUNT_MAX`: sets the maximum number of TSDs that can be used (Shared Registry only) Regarding the TSDs maximum count, this is a one way option, only allowing to increase the count. In order to allow for this, I rearranged the code to have some `setOption` member function to the relevant classes, using the `scudo::Option` class enum to determine what is to be set. This also fixes an issue where a static variable (`Ready`) was used in templated functions without being set back to `false` every time. Reviewers: pcc, eugenis, hctim, cferris Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D84667 |
||
---|---|---|
.. | ||
standalone | ||
CMakeLists.txt | ||
scudo_allocator.cpp | ||
scudo_allocator.h | ||
scudo_allocator_combined.h | ||
scudo_allocator_secondary.h | ||
scudo_crc32.cpp | ||
scudo_crc32.h | ||
scudo_errors.cpp | ||
scudo_errors.h | ||
scudo_flags.cpp | ||
scudo_flags.h | ||
scudo_flags.inc | ||
scudo_interface_internal.h | ||
scudo_malloc.cpp | ||
scudo_new_delete.cpp | ||
scudo_platform.h | ||
scudo_termination.cpp | ||
scudo_tsd.h | ||
scudo_tsd_exclusive.cpp | ||
scudo_tsd_exclusive.inc | ||
scudo_tsd_shared.cpp | ||
scudo_tsd_shared.inc | ||
scudo_utils.cpp | ||
scudo_utils.h |