Print this page
rev 2722 : 7095194: G1: HeapRegion::GrainBytes, GrainWords, and CardsPerRegion should be size_t
Summary: Declare GrainBytes, GrainWords, and CardsPerRegion as size_t.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
          +++ new/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
↓ open down ↓ 290 lines elided ↑ open up ↑
 291  291      G1ErgoVerbose::set_enabled(true);
 292  292      // Given that we don't currently have a verboseness level
 293  293      // parameter, we'll hardcode this to high. This can be easily
 294  294      // changed in the future.
 295  295      G1ErgoVerbose::set_level(ErgoHigh);
 296  296    } else {
 297  297      G1ErgoVerbose::set_enabled(false);
 298  298    }
 299  299  
 300  300    // Verify PLAB sizes
 301      -  const uint region_size = HeapRegion::GrainWords;
      301 +  const size_t region_size = HeapRegion::GrainWords;
 302  302    if (YoungPLABSize > region_size || OldPLABSize > region_size) {
 303  303      char buffer[128];
 304      -    jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most %u",
      304 +    jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most "SIZE_FORMAT,
 305  305                   OldPLABSize > region_size ? "Old" : "Young", region_size);
 306  306      vm_exit_during_initialization(buffer);
 307  307    }
 308  308  
 309  309    _recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime());
 310  310    _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0;
 311  311  
 312  312    _par_last_gc_worker_start_times_ms = new double[_parallel_gc_threads];
 313  313    _par_last_ext_root_scan_times_ms = new double[_parallel_gc_threads];
 314  314    _par_last_mark_stack_scan_times_ms = new double[_parallel_gc_threads];
↓ open down ↓ 2801 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX