comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @ 4020:5e5d4821bf07

7097516: G1: assert(0<= from_card && from_card<HeapRegion::CardsPerRegion) failed: Must be in range. Summary: Introduced a version of is_in_reserved() that looks at _orig_end as opposed to _end. Reviewed-by: tonyp, stefank
author brutisso
date Thu, 20 Oct 2011 10:21:35 +0200
parents 65a8ff39a6da
children 720b6a76dd9d
comparison
equal deleted inserted replaced
4014:bf2d2b8b1726 4020:5e5d4821bf07
141 141
142 HeapRegion* loc_hr = hr(); 142 HeapRegion* loc_hr = hr();
143 // If the test below fails, then this table was reused concurrently 143 // If the test below fails, then this table was reused concurrently
144 // with this operation. This is OK, since the old table was coarsened, 144 // with this operation. This is OK, since the old table was coarsened,
145 // and adding a bit to the new table is never incorrect. 145 // and adding a bit to the new table is never incorrect.
146 if (loc_hr->is_in_reserved(from)) { 146 // If the table used to belong to a continues humongous region and is
147 // now reused for the corresponding start humongous region, we need to
148 // make sure that we detect this. Thus, we call is_in_reserved_raw()
149 // instead of just is_in_reserved() here.
150 if (loc_hr->is_in_reserved_raw(from)) {
147 size_t hw_offset = pointer_delta((HeapWord*)from, loc_hr->bottom()); 151 size_t hw_offset = pointer_delta((HeapWord*)from, loc_hr->bottom());
148 CardIdx_t from_card = (CardIdx_t) 152 CardIdx_t from_card = (CardIdx_t)
149 hw_offset >> (CardTableModRefBS::card_shift - LogHeapWordSize); 153 hw_offset >> (CardTableModRefBS::card_shift - LogHeapWordSize);
150 154
151 assert(0 <= from_card && (size_t)from_card < HeapRegion::CardsPerRegion, 155 assert(0 <= from_card && (size_t)from_card < HeapRegion::CardsPerRegion,