Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 10239:f14063dcd52a
8013791: G1: G1CollectorPolicy::initialize_flags() may set min_alignment > max_alignment
Summary: Make sure max alignemnt is at least as large as min alignment
Reviewed-by: johnc, jmasa, tschatzl
author | brutisso |
---|---|
date | Mon, 06 May 2013 09:16:14 +0200 |
parents | 9aa8d8037ee3 |
children | 48391ab0687e |
comparison
equal
deleted
inserted
replaced
10238:1d0fba8a2a6d | 10239:f14063dcd52a |
---|---|
307 _young_gen_sizer = new G1YoungGenSizer(); // Must be after call to initialize_flags | 307 _young_gen_sizer = new G1YoungGenSizer(); // Must be after call to initialize_flags |
308 } | 308 } |
309 | 309 |
310 void G1CollectorPolicy::initialize_flags() { | 310 void G1CollectorPolicy::initialize_flags() { |
311 set_min_alignment(HeapRegion::GrainBytes); | 311 set_min_alignment(HeapRegion::GrainBytes); |
312 set_max_alignment(GenRemSet::max_alignment_constraint(rem_set_name())); | 312 size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name()); |
313 set_max_alignment(MAX2(card_table_alignment, min_alignment())); | |
313 if (SurvivorRatio < 1) { | 314 if (SurvivorRatio < 1) { |
314 vm_exit_during_initialization("Invalid survivor ratio specified"); | 315 vm_exit_during_initialization("Invalid survivor ratio specified"); |
315 } | 316 } |
316 CollectorPolicy::initialize_flags(); | 317 CollectorPolicy::initialize_flags(); |
317 } | 318 } |