src/hotspot/share/gc/g1/g1CollectedHeap.cpp
changeset 52674 c9325aa887da
parent 52582 6df094be7f58
child 52716 877dd2b0f36c
equal deleted inserted replaced
52673:61b3b58a1d1d 52674:c9325aa887da
   751   }
   751   }
   752 
   752 
   753   return result;
   753   return result;
   754 }
   754 }
   755 
   755 
   756 void G1CollectedHeap::dealloc_archive_regions(MemRegion* ranges, size_t count) {
   756 void G1CollectedHeap::dealloc_archive_regions(MemRegion* ranges, size_t count, bool is_open) {
   757   assert(!is_init_completed(), "Expect to be called at JVM init time");
   757   assert(!is_init_completed(), "Expect to be called at JVM init time");
   758   assert(ranges != NULL, "MemRegion array NULL");
   758   assert(ranges != NULL, "MemRegion array NULL");
   759   assert(count != 0, "No MemRegions provided");
   759   assert(count != 0, "No MemRegions provided");
   760   MemRegion reserved = _hrm.reserved();
   760   MemRegion reserved = _hrm.reserved();
   761   HeapWord* prev_last_addr = NULL;
   761   HeapWord* prev_last_addr = NULL;
   813       _hrm.shrink_at(curr_index, 1);
   813       _hrm.shrink_at(curr_index, 1);
   814       uncommitted_regions++;
   814       uncommitted_regions++;
   815     }
   815     }
   816 
   816 
   817     // Notify mark-sweep that this is no longer an archive range.
   817     // Notify mark-sweep that this is no longer an archive range.
   818     G1ArchiveAllocator::set_range_archive(ranges[i], false);
   818     G1ArchiveAllocator::clear_range_archive(ranges[i], is_open);
   819   }
   819   }
   820 
   820 
   821   if (uncommitted_regions != 0) {
   821   if (uncommitted_regions != 0) {
   822     log_debug(gc, ergo, heap)("Attempt heap shrinking (uncommitted archive regions). Total size: " SIZE_FORMAT "B",
   822     log_debug(gc, ergo, heap)("Attempt heap shrinking (uncommitted archive regions). Total size: " SIZE_FORMAT "B",
   823                               HeapRegion::GrainWords * HeapWordSize * uncommitted_regions);
   823                               HeapRegion::GrainWords * HeapWordSize * uncommitted_regions);