Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 3986:65a8ff39a6da
7095194: G1: HeapRegion::GrainBytes, GrainWords, and CardsPerRegion should be size_t
Summary: Declare GrainBytes, GrainWords, and CardsPerRegion as size_t.
Reviewed-by: jcoomes, tonyp, jmasa
author | johnc |
---|---|
date | Wed, 05 Oct 2011 08:44:10 -0700 |
parents | 811ec3d0833b |
children | 074f0252cc13 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Sep 12 16:09:50 2011 +0200 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Oct 05 08:44:10 2011 -0700 @@ -552,8 +552,7 @@ } HeapRegion* G1CollectedHeap::new_region(size_t word_size, bool do_expand) { - assert(!isHumongous(word_size) || - word_size <= (size_t) HeapRegion::GrainWords, + assert(!isHumongous(word_size) || word_size <= HeapRegion::GrainWords, "the only time we use this to allocate a humongous region is " "when we are allocating a single humongous region"); @@ -1170,7 +1169,7 @@ if (!hr->isHumongous()) { _hr_printer->post_compaction(hr, G1HRPrinter::Old); } else if (hr->startsHumongous()) { - if (hr->capacity() == (size_t) HeapRegion::GrainBytes) { + if (hr->capacity() == HeapRegion::GrainBytes) { // single humongous region _hr_printer->post_compaction(hr, G1HRPrinter::SingleHumongous); } else { @@ -1971,7 +1970,7 @@ size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1; guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized"); - guarantee((size_t) HeapRegion::CardsPerRegion < max_cards_per_region, + guarantee(HeapRegion::CardsPerRegion < max_cards_per_region, "too many cards per region"); HeapRegionSet::set_unrealistically_long_length(max_regions() + 1); @@ -3051,8 +3050,7 @@ _g1_storage.high(), _g1_storage.high_boundary()); st->cr(); - st->print(" region size " SIZE_FORMAT "K, ", - HeapRegion::GrainBytes/K); + st->print(" region size " SIZE_FORMAT "K, ", HeapRegion::GrainBytes / K); size_t young_regions = _young_list->length(); st->print(SIZE_FORMAT " young (" SIZE_FORMAT "K), ", young_regions, young_regions * HeapRegion::GrainBytes / K);