diff --git a/src/hotspot/share/cds/aotMappedHeapLoader.cpp b/src/hotspot/share/cds/aotMappedHeapLoader.cpp index 84051cbd9e5..a8678ed757f 100644 --- a/src/hotspot/share/cds/aotMappedHeapLoader.cpp +++ b/src/hotspot/share/cds/aotMappedHeapLoader.cpp @@ -619,7 +619,7 @@ bool AOTMappedHeapLoader::map_heap_region_impl(FileMapInfo* info) { aot_log_info(aot)("Preferred address to map heap data (to avoid relocation) is " INTPTR_FORMAT, p2i(requested_start)); // allocate from java heap - HeapWord* start = G1CollectedHeap::heap()->alloc_archive_region(word_size, (HeapWord*)requested_start); + HeapWord* start = G1CollectedHeap::heap()->alloc_archive_region(word_size); if (start == nullptr) { AOTMetaspace::report_loading_error("UseSharedSpaces: Unable to allocate java heap region for archive heap."); return false; diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index b6c3c0b0907..8f83a653885 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -525,7 +525,7 @@ void G1CollectedHeap::iterate_regions_in_range(MemRegion range, const Func& func } } -HeapWord* G1CollectedHeap::alloc_archive_region(size_t word_size, HeapWord* preferred_addr) { +HeapWord* G1CollectedHeap::alloc_archive_region(size_t word_size) { assert(!is_init_completed(), "Expect to be called at JVM init time"); MutexLocker x(Heap_lock); diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp index aff7166d391..cc57b4763d0 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp @@ -735,12 +735,10 @@ public: void iterate_regions_in_range(MemRegion range, const Func& func); // Commit the required number of G1 region(s) according to the size requested - // and mark them as 'old' region(s). Preferred address is treated as a hint for - // the location of the archive space in the heap. The returned address may or may - // not be same as the preferred address. + // and mark them as 'old' region(s). // This API is only used for allocating heap space for the archived heap objects // in the CDS archive. - HeapWord* alloc_archive_region(size_t word_size, HeapWord* preferred_addr); + HeapWord* alloc_archive_region(size_t word_size); // Populate the G1BlockOffsetTable for archived regions with the given // memory range.