--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2020-08-19 22:47:01.692616339 +0200 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2020-08-19 22:47:01.544614208 +0200 @@ -1681,7 +1681,7 @@ guarantee(g1_rs.base() >= (char*)G1CardTable::card_size, "Java heap must not start within the first card."); // Also create a G1 rem set. _rem_set = new G1RemSet(this, _card_table, _hot_card_cache); - _rem_set->initialize(max_reserved_capacity(), max_regions()); + _rem_set->initialize(max_regions()); size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1; guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized"); @@ -1690,15 +1690,13 @@ FreeRegionList::set_unrealistically_long_length(max_expandable_regions() + 1); - _bot = new G1BlockOffsetTable(reserved_region(), bot_storage); + _bot = new G1BlockOffsetTable(reserved(), bot_storage); { - HeapWord* start = _hrm->reserved().start(); - HeapWord* end = _hrm->reserved().end(); size_t granularity = HeapRegion::GrainBytes; - _region_attr.initialize(start, end, granularity); - _humongous_reclaim_candidates.initialize(start, end, granularity); + _region_attr.initialize(reserved(), granularity); + _humongous_reclaim_candidates.initialize(reserved(), granularity); } _workers = new WorkGang("GC Thread", ParallelGCThreads, @@ -2271,7 +2269,7 @@ #ifdef ASSERT bool G1CollectedHeap::is_in_exact(const void* p) const { - bool contains = reserved_region().contains(p); + bool contains = reserved().contains(p); bool available = _hrm->is_available(addr_to_region((HeapWord*)p)); if (contains && available) { return true; @@ -2393,10 +2391,6 @@ return _hrm->max_expandable_length() * HeapRegion::GrainBytes; } -size_t G1CollectedHeap::max_reserved_capacity() const { - return _hrm->max_length() * HeapRegion::GrainBytes; -} - void G1CollectedHeap::deduplicate_string(oop str) { assert(java_lang_String::is_instance(str), "invariant");