src/hotspot/share/gc/g1/g1CollectedHeap.cpp
changeset 50281 bc1336220671
parent 50071 758deedaae84
child 50416 ef980b9ac191
equal deleted inserted replaced
50280:5aaf3a471172 50281:bc1336220671
  1609   // 6843694 - ensure that the maximum region index can fit
  1609   // 6843694 - ensure that the maximum region index can fit
  1610   // in the remembered set structures.
  1610   // in the remembered set structures.
  1611   const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
  1611   const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
  1612   guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
  1612   guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
  1613 
  1613 
       
  1614   // The G1FromCardCache reserves card with value 0 as "invalid", so the heap must not
       
  1615   // start within the first card.
       
  1616   guarantee(g1_rs.base() >= (char*)G1CardTable::card_size, "Java heap must not start within the first card.");
  1614   // Also create a G1 rem set.
  1617   // Also create a G1 rem set.
  1615   _g1_rem_set = new G1RemSet(this, _card_table, _hot_card_cache);
  1618   _g1_rem_set = new G1RemSet(this, _card_table, _hot_card_cache);
  1616   _g1_rem_set->initialize(max_capacity(), max_regions());
  1619   _g1_rem_set->initialize(max_capacity(), max_regions());
  1617 
  1620 
  1618   size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;
  1621   size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;