< prev index next >

src/share/vm/gc/g1/g1CollectedHeap.cpp

Print this page
rev 9260 : 8141422: G1 eager reclaim card dirtying may dirty outide of allocated objects
Reviewed-by:

@@ -3611,11 +3611,11 @@
         while (hrrs.has_next(card_index)) {
           jbyte* card_ptr = (jbyte*)bs->byte_for_index(card_index);
           // The remembered set might contain references to already freed
           // regions. Filter out such entries to avoid failing card table
           // verification.
-          if (!g1h->heap_region_containing(bs->addr_for(card_ptr))->is_free()) {
+          if (g1h->is_in_closed_subset(bs->addr_for(card_ptr))) {
             if (*card_ptr != CardTableModRefBS::dirty_card_val()) {
               *card_ptr = CardTableModRefBS::dirty_card_val();
               _dcq.enqueue(card_ptr);
             }
           }
< prev index next >