This alignment guarantee enables simpler group range check while page
releasing and a potential optimization which is, now all the pointers
from the same group are also inth same region, that means the complexity
in markFreeBlocks() can be reduced as well.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Add one more context, on SizeClassAllocator64, now the pointer always gets compacted at least by using the offset from the region begin. This means the PrimaryCompactPtrT is able to use u32 in DefaultConfig as well. This will be done in later metadata size reduction work.
compiler-rt/lib/scudo/standalone/primary32.h | ||
---|---|---|
124–125 | Would it be better to name this compactPtrGroupBase? And use Base instead of Beg for all of the variable names? You use base in a few other places, and I think it makes it easier to understand the code since you are currently using both beg and base and sometimes comparing the values. | |
129–133 | Since this function doesn't do anything, do you need it any more? Or do you want to keep it so that the primary32 and primary64 are the same? |
- Address review comment
- Restrict (GroupSize == RegionSize) in SizeClassAllocator32 so that the logic of page releasing will be easier
Address review comment
compiler-rt/lib/scudo/standalone/primary32.h | ||
---|---|---|
374 | Oops, forgot to update the log. Done. |
base