[compiler-rt] [scudo] Reduce thread contention in secondary cache releases. (PR #102984)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 17:06:54 PDT 2024


================
@@ -351,9 +351,10 @@ class MapAllocatorCache {
     for (MemMapT &EvictMemMap : EvictionMemMaps)
       unmapCallBack(EvictMemMap);
 
-    if (Interval >= 0) {
+    if (Interval >= 0 && Mutex.tryLock()) {
----------------
cferris1000 wrote:

Small nit, add a comment explaining why you are doing this.

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


More information about the llvm-commits mailing list