[compiler-rt] [scudo] Added LRU eviction policy to secondary cache. (PR #99409)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 16:04:13 PDT 2024


================
@@ -202,6 +210,10 @@ template <typename Config> class MapAllocatorCache {
   static_assert(Config::getDefaultMaxEntriesCount() <=
                     Config::getEntriesArraySize(),
                 "");
+  // Ensure the cache entry array size fits in the LRU list Next and Prev
+  // index fields
+  static_assert(Config::getEntriesArraySize() <= CachedBlock::CacheIndexMax,
+                "");
----------------
ChiaHungDuan wrote:

Let's have some thing in the description. It can be a brief one and let the comment tell the detail

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


More information about the llvm-commits mailing list