This CL removes the restriction that pushing blocks into BatchClassId
can only be done when freelist is not empty. Without this constraint,
BatchClassId is also available for gathering blocks into groups.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/scudo/standalone/primary32.h | ||
---|---|---|
143–144 | Should this be in an else block? Also, would it be useful to rewrite this as: if (LIKELY(!BG.Batches.empty()) for (...) else ++TotalBlocks; I don't know if most batches are empty or not, so that LIKELY might be wrong. | |
462 | This was memory in the original comment and make a bit more sense. Or did you mean use a single extra block here? |
compiler-rt/lib/scudo/standalone/primary32.h | ||
---|---|---|
143–144 | I was trying to make it less indent. It does look better to put it in an else block. Done. | |
462 | I mean the single extra block here. Suppose a TransferBatch records 10 free blocks of BatchClass, A TransferBatch used in the freelist of BatchClass records 9 blocks + itself. Instead of recording 10 blocks excluding itself. |
Should this be in an else block?
Also, would it be useful to rewrite this as:
if (LIKELY(!BG.Batches.empty())
else
I don't know if most batches are empty or not, so that LIKELY might be wrong.