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

Joshua Baehring via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 12:43:59 PDT 2024


================
@@ -334,9 +336,6 @@ class MapAllocatorCache {
       }
 
       insert(Entry);
----------------
JoshuaMBa wrote:

My thinking was that the insert() and remove() functions should be responsible for maintaining all the metadata for the list. I don't see a problem with updating the value in store() unless insert() starts being used more than once, in which case we would need to update `LastUnreleasedEntry` outside of insert() every time we call it. I will note, however, that we already now whether or not the pages are released within insert() because insert() takes in a `CachedBlock::Entry` which will have its time value set to `0` if it has been released. This way we can handle the logic for inserting released entries directly in insert as well as updating `LastUnreleasedEntry`.

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


More information about the llvm-commits mailing list