< prev index next >

src/share/vm/gc_implementation/g1/heapRegion.cpp

Print this page
rev 7653 : 8068971: A heap region being cleared should not belong to the cset

@@ -160,12 +160,12 @@
 void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) {
   assert(_humongous_start_region == NULL,
          "we should have already filtered out humongous regions");
   assert(_end == orig_end(),
          "we should have already filtered out humongous regions");
-
-  _in_collection_set = false;
+  assert(_in_collection_set == false,
+         "can't clear a heap region in the collection set");
 
   set_allocation_context(AllocationContext::system());
   set_young_index_in_cset(-1);
   uninstall_surv_rate_group();
   set_free();
< prev index next >