[PATCH] D83993: [scudo][standalone] Change the release loop for efficiency purposes
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 07:25:19 PDT 2020
cryptoad added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/release.h:270
+ PInRegion += BlockSize;
+ while (PInRegion < RoundedRegionSize) {
+ Counters.incRange(RegionIndex, PInRegion >> PageSizeLog,
----------------
pcc wrote:
> I guess this is equivalent to the code previously on lines 252-253. But I'm confused about why we would have more than one of these. In my mind these blocks would consume as much of the region as possible, which means that at the end we would just have a fraction of a block at most. Is that not the case?
I went for something generic, and I think you are right in the sense that the loop will only iterate once. I will verify it and update it if it's the case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83993/new/
https://reviews.llvm.org/D83993
More information about the llvm-commits
mailing list