< prev index next >

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

Print this page
rev 52634 : 8214118: HeapRegions marked as archive even if CDS mapping fails
Reviewed-by:

@@ -751,11 +751,11 @@
   }
 
   return result;
 }
 
-void G1CollectedHeap::dealloc_archive_regions(MemRegion* ranges, size_t count) {
+void G1CollectedHeap::dealloc_archive_regions(MemRegion* ranges, size_t count, bool is_open) {
   assert(!is_init_completed(), "Expect to be called at JVM init time");
   assert(ranges != NULL, "MemRegion array NULL");
   assert(count != 0, "No MemRegions provided");
   MemRegion reserved = _hrm.reserved();
   HeapWord* prev_last_addr = NULL;

@@ -813,11 +813,11 @@
       _hrm.shrink_at(curr_index, 1);
       uncommitted_regions++;
     }
 
     // Notify mark-sweep that this is no longer an archive range.
-    G1ArchiveAllocator::set_range_archive(ranges[i], false);
+    G1ArchiveAllocator::clear_range_archive(ranges[i], is_open);
   }
 
   if (uncommitted_regions != 0) {
     log_debug(gc, ergo, heap)("Attempt heap shrinking (uncommitted archive regions). Total size: " SIZE_FORMAT "B",
                               HeapRegion::GrainWords * HeapWordSize * uncommitted_regions);
< prev index next >