[compiler-rt] [scudo] Add partial chunk heuristic to retrieval algorithm. (PR #105009)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 11:41:41 PDT 2024
================
@@ -72,6 +72,14 @@ namespace {
struct CachedBlock {
static constexpr u16 CacheIndexMax = UINT16_MAX;
static constexpr u16 InvalidEntry = CacheIndexMax;
+ // * MaxCachePagesToRelease default is currently 4
+ // - We arrived at this value after noticing that mapping
+ // in larger memory regions performs better than releasing
+ // memory and forcing a cache hit. According to the data,
+ // it suggests that beyond 16KB, the release execution time is
+ // longer than the map execution time. In this way, the default
+ // is dependent on the platform.
+ static constexpr uptr MaxCachePagesToRelease = 4U;
----------------
ChiaHungDuan wrote:
I'm not sure if "Commited" is good for here (we are not sure if it's committed). Another candidate can be, `MaxReleasedCachePages` and `MaxUnreleasedCachePages`, given that the API is using "release", this seems to align with it.
https://github.com/llvm/llvm-project/pull/105009
More information about the llvm-commits
mailing list