[compiler-rt] [scudo] Refactor store() and retrieve(). (PR #102024)
Christopher Ferris via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 17:59:49 PDT 2024
================
@@ -807,7 +821,13 @@ void MapAllocator<Config>::deallocate(const Options &Options, void *Ptr)
Stats.sub(StatAllocated, CommitSize);
Stats.sub(StatMapped, H->MemMap.getCapacity());
}
- Cache.store(Options, H);
+
+ if (!Cache.canCache(H->CommitSize)) {
----------------
cferris1000 wrote:
Small nit, it is usually slightly easier to read if you have the positive case first and the negative case second. Thus do the sotre in the if clause and the unmap in the else.
https://github.com/llvm/llvm-project/pull/102024
More information about the llvm-commits
mailing list