[compiler-rt] [scudo] Fix release to OS logic in secondary cache. (PR #103303)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 15:57:43 PDT 2024


================
@@ -336,6 +336,31 @@ TEST_F(MapAllocatorCacheTest, CacheOrder) {
     MemMap.unmap();
 }
 
+TEST_F(MapAllocatorCacheTest, CacheOrderWithRelease) {
+  std::vector<scudo::MemMapT> MemMaps;
+  Cache->setOption(scudo::Option::MaxCacheEntriesCount,
+                   CacheConfig::getEntriesArraySize());
+
+  fillCacheWithSameSizeBlocks(MemMaps, CacheConfig::getEntriesArraySize() - 1,
+                              TestAllocSize);
+
+  // Enable releases and perform a deallocation to trigger releases
----------------
cferris1000 wrote:

Isn't the release triggered by the call to store?

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


More information about the llvm-commits mailing list