[compiler-rt] [scudo] Update secondary cache time-based release logic. (PR #107507)
Joshua Baehring via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 21:33:05 PDT 2024
================
@@ -590,35 +599,36 @@ class MapAllocatorCache {
}
}
- void releaseIfOlderThan(CachedBlock &Entry, u64 Time) REQUIRES(Mutex) {
- if (!Entry.isValid() || !Entry.Time)
- return;
- if (Entry.Time > Time) {
- if (OldestTime == 0 || Entry.Time < OldestTime)
- OldestTime = Entry.Time;
- return;
- }
+ inline void release(CachedBlock &Entry) {
+ DCHECK(Entry.Time != 0);
Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
Entry.Time = 0;
}
void releaseOlderThan(u64 Time) EXCLUDES(Mutex) {
----------------
JoshuaMBa wrote:
@ChiaHungDuan, here is the new release logic that we had planned on adding.
https://github.com/llvm/llvm-project/pull/107507
More information about the llvm-commits
mailing list