[compiler-rt] Reapply "[scudo] Update secondary cache time-based release logic" (PR #110391)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 12:56:20 PDT 2024


================
@@ -321,9 +322,11 @@ class MapAllocatorCache {
         }
         CachedBlock PrevEntry = Quarantine[QuarantinePos];
         Quarantine[QuarantinePos] = Entry;
-        if (OldestTime == 0)
-          OldestTime = Entry.Time;
         Entry = PrevEntry;
+        // Update the entry time to reflect the time that the
+        // quarantined memory is placed in the Entries array
+        if (Entry.Time != 0)
+          Entry.Time = Time;
----------------
ChiaHungDuan wrote:

Please say more about why we only update the time when it's non-zero

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


More information about the llvm-commits mailing list