-
Enhancement
-
Resolution: Fixed
-
P4
-
20
-
b18
In `ParallelCompactData::initialize_region_data`:
```
const size_t count = (region_size + RegionSizeOffsetMask) >> Log2RegionSize;
```
The `+ RegionSizeOffsetMask` part is to account for `region_size` being unaligned. However, in the sole caller of this method, the alignment is already asserted.
```
assert((region_size & RegionSizeOffsetMask) == 0,
"region size not a multiple of RegionSize");
```
Drop the unnecessary adjustment and move the assertion inside the method as a precondition.
```
const size_t count = (region_size + RegionSizeOffsetMask) >> Log2RegionSize;
```
The `+ RegionSizeOffsetMask` part is to account for `region_size` being unaligned. However, in the sole caller of this method, the alignment is already asserted.
```
assert((region_size & RegionSizeOffsetMask) == 0,
"region size not a multiple of RegionSize");
```
Drop the unnecessary adjustment and move the assertion inside the method as a precondition.