Skip to content

Commit

Permalink
8294057: Parallel: Tighten ParallelCompactData::initialize_region_data
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, sjohanss
  • Loading branch information
albertnetymk committed Sep 28, 2022
1 parent 1ea0d6b commit 94e14da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/hotspot/share/gc/parallel/psParallelCompact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,6 @@ bool ParallelCompactData::initialize(MemRegion covered_region)

assert(region_align_down(_region_start) == _region_start,
"region start not aligned");
assert((region_size & RegionSizeOffsetMask) == 0,
"region size not a multiple of RegionSize");

bool result = initialize_region_data(region_size) && initialize_block_data();
return result;
Expand Down Expand Up @@ -470,7 +468,10 @@ ParallelCompactData::create_vspace(size_t count, size_t element_size)

bool ParallelCompactData::initialize_region_data(size_t region_size)
{
const size_t count = (region_size + RegionSizeOffsetMask) >> Log2RegionSize;
assert((region_size & RegionSizeOffsetMask) == 0,
"region size not a multiple of RegionSize");

const size_t count = region_size >> Log2RegionSize;
_region_vspace = create_vspace(count, sizeof(RegionData));
if (_region_vspace != 0) {
_region_data = (RegionData*)_region_vspace->reserved_low_addr();
Expand Down

1 comment on commit 94e14da

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.