1532 _g1_committed = MemRegion((HeapWord*)_g1_storage.low(), (size_t) 0); |
1532 _g1_committed = MemRegion((HeapWord*)_g1_storage.low(), (size_t) 0); |
1533 _g1_max_committed = _g1_committed; |
1533 _g1_max_committed = _g1_committed; |
1534 _hrs = new HeapRegionSeq(_expansion_regions); |
1534 _hrs = new HeapRegionSeq(_expansion_regions); |
1535 guarantee(_hrs != NULL, "Couldn't allocate HeapRegionSeq"); |
1535 guarantee(_hrs != NULL, "Couldn't allocate HeapRegionSeq"); |
1536 guarantee(_cur_alloc_region == NULL, "from constructor"); |
1536 guarantee(_cur_alloc_region == NULL, "from constructor"); |
|
1537 |
|
1538 // 6843694 - ensure that the maximum region index can fit |
|
1539 // in the remembered set structures. |
|
1540 const size_t max_region_idx = ((size_t)1 << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1; |
|
1541 guarantee((max_regions() - 1) <= max_region_idx, "too many regions"); |
|
1542 |
|
1543 const size_t cards_per_region = HeapRegion::GrainBytes >> CardTableModRefBS::card_shift; |
|
1544 size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1; |
|
1545 guarantee(cards_per_region < max_cards_per_region, "too many cards per region"); |
1537 |
1546 |
1538 _bot_shared = new G1BlockOffsetSharedArray(_reserved, |
1547 _bot_shared = new G1BlockOffsetSharedArray(_reserved, |
1539 heap_word_size(init_byte_size)); |
1548 heap_word_size(init_byte_size)); |
1540 |
1549 |
1541 _g1h = this; |
1550 _g1h = this; |