[compiler-rt] [scudo] Fix release to OS logic in secondary cache. (PR #103303)
Joshua Baehring via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 16:12:51 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
+ Cache->setOption(scudo::Option::ReleaseInterval, 0);
----------------
JoshuaMBa wrote:
As in a call to `releaseToOs()` or a direct call to `store()`?
https://github.com/llvm/llvm-project/pull/103303
More information about the llvm-commits
mailing list