mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8013791: G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
Make sure max alignemnt is at least as large as min alignment Reviewed-by: johnc, jmasa, tschatzl
This commit is contained in:
parent
d08bf8d1be
commit
36c195270d
3 changed files with 45 additions and 4 deletions
|
@ -309,7 +309,8 @@ G1CollectorPolicy::G1CollectorPolicy() :
|
|||
|
||||
void G1CollectorPolicy::initialize_flags() {
|
||||
set_min_alignment(HeapRegion::GrainBytes);
|
||||
set_max_alignment(GenRemSet::max_alignment_constraint(rem_set_name()));
|
||||
size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name());
|
||||
set_max_alignment(MAX2(card_table_alignment, min_alignment()));
|
||||
if (SurvivorRatio < 1) {
|
||||
vm_exit_during_initialization("Invalid survivor ratio specified");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue