Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scudo][standalone] Correct min/max region indices
The original code to keep track of the minimum and maximum indices of allocated 32-bit primary regions was sketchy at best. `MinRegionIndex` & `MaxRegionIndex` were shared between all size classes, and could (theoretically) have been updated concurrently. This didn't materialize anywhere I could see, but still it's not proper. This changes those min/max indices by making them class specific rather than global: classes are locked when growing, so there is no concurrency there. This also allows to simplify some of the 32-bit release code, that now doesn't have to go through all the regions to get the proper min/max. Iterate and unmap will no longer have access to the global min/max, but they aren't used as much so this is fine. Differential Revision: https://reviews.llvm.org/D91106
- Loading branch information
Kostya Kortchinsky
committed
Nov 16, 2020
1 parent
7c62c63
commit f0703cb
Showing
1 changed file
with
49 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters