[compiler-rt] [scudo] Add partial chunk heuristic to retrieval algorithm. (PR #104807)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 09:12:13 PDT 2024
================
@@ -659,8 +710,15 @@ MapAllocator<Config>::tryAllocateFromCache(const Options &Options, uptr Size,
FillContentsMode FillContents) {
CachedBlock Entry;
uptr EntryHeaderPos;
+ uptr MaxAllowedFragmentedBytes;
+ const uptr PageSize = getPageSizeCached();
+
+ MaxAllowedFragmentedBytes = MaxUnusedCachePages * PageSize;
+ if (LIKELY(!useMemoryTagging<Config>(Options)))
+ MaxAllowedFragmentedBytes += CachedBlock::ReleaseMemoryUpperBound;
----------------
ChiaHungDuan wrote:
if (UNLIKELY(useMemoryTagging ...))
MaxAllowedFragmentedBytes = ...;
https://github.com/llvm/llvm-project/pull/104807
More information about the llvm-commits
mailing list