src/hotspot/share/gc/g1/g1CollectedHeap.cpp
changeset 58015 dd84de796f2c
parent 58003 a645b2f7bece
child 58033 9162feb63c42
equal deleted inserted replaced
58014:aba258cd7df8 58015:dd84de796f2c
  1664   // base of the reserved heap may end up differing from the
  1664   // base of the reserved heap may end up differing from the
  1665   // address that was requested (i.e. the preferred heap base).
  1665   // address that was requested (i.e. the preferred heap base).
  1666   // If this happens then we could end up using a non-optimal
  1666   // If this happens then we could end up using a non-optimal
  1667   // compressed oops mode.
  1667   // compressed oops mode.
  1668 
  1668 
  1669   ReservedSpace heap_rs = Universe::reserve_heap(reserved_byte_size,
  1669   ReservedHeapSpace heap_rs = Universe::reserve_heap(reserved_byte_size,
  1670                                                  HeapAlignment);
  1670                                                      HeapAlignment);
  1671 
  1671 
  1672   initialize_reserved_region((HeapWord*)heap_rs.base(), (HeapWord*)(heap_rs.base() + heap_rs.size()));
  1672   initialize_reserved_region(heap_rs);
  1673 
  1673 
  1674   // Create the barrier set for the entire reserved region.
  1674   // Create the barrier set for the entire reserved region.
  1675   G1CardTable* ct = new G1CardTable(reserved_region());
  1675   G1CardTable* ct = new G1CardTable(heap_rs.region());
  1676   ct->initialize();
  1676   ct->initialize();
  1677   G1BarrierSet* bs = new G1BarrierSet(ct);
  1677   G1BarrierSet* bs = new G1BarrierSet(ct);
  1678   bs->initialize();
  1678   bs->initialize();
  1679   assert(bs->is_a(BarrierSet::G1BarrierSet), "sanity");
  1679   assert(bs->is_a(BarrierSet::G1BarrierSet), "sanity");
  1680   BarrierSet::set_barrier_set(bs);
  1680   BarrierSet::set_barrier_set(bs);
  1740 
  1740 
  1741   _hrm = HeapRegionManager::create_manager(this);
  1741   _hrm = HeapRegionManager::create_manager(this);
  1742 
  1742 
  1743   _hrm->initialize(heap_storage, prev_bitmap_storage, next_bitmap_storage, bot_storage, cardtable_storage, card_counts_storage);
  1743   _hrm->initialize(heap_storage, prev_bitmap_storage, next_bitmap_storage, bot_storage, cardtable_storage, card_counts_storage);
  1744   _card_table->initialize(cardtable_storage);
  1744   _card_table->initialize(cardtable_storage);
       
  1745 
  1745   // Do later initialization work for concurrent refinement.
  1746   // Do later initialization work for concurrent refinement.
  1746   _hot_card_cache->initialize(card_counts_storage);
  1747   _hot_card_cache->initialize(card_counts_storage);
  1747 
  1748 
  1748   // 6843694 - ensure that the maximum region index can fit
  1749   // 6843694 - ensure that the maximum region index can fit
  1749   // in the remembered set structures.
  1750   // in the remembered set structures.