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

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 11:57:42 PDT 2024


================
@@ -514,6 +512,11 @@ class MapAllocatorCache {
     return (EntriesCount >= atomic_load_relaxed(&MaxEntriesCount));
   }
 
+  inline void advanceDecommitBase() REQUIRES(Mutex) {
+    if (DecommitBase != CachedBlock::InvalidEntry)
+      DecommitBase = Entries[DecommitBase].Prev;
+  }
+
----------------
ChiaHungDuan wrote:

I think we can just inline this function. From its callers (now there are two), one doesn't need the validity check, another already has the check in the loop header.

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


More information about the llvm-commits mailing list