[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 12 13:12:51 PDT 2024


================
@@ -318,9 +318,10 @@ class MapAllocatorCache {
         }
         CachedBlock PrevEntry = Quarantine[QuarantinePos];
         Quarantine[QuarantinePos] = Entry;
-        if (OldestTime == 0)
-          OldestTime = Entry.Time;
         Entry = PrevEntry;
+        // Set entry time once more to reflect time
+        // that quarantined memory was placed in the cache
+        Entry.Time = Time;
----------------
JoshuaMBa wrote:

Ok, I also specified that this line is to account for moving the quarantined entries into the `Entries` array since I thought "cache" was a little ambiguous considering the quarantine is technically part of the cache.

https://github.com/llvm/llvm-project/pull/107507


More information about the llvm-commits mailing list