Remove preferred_addr parameter.

This commit is contained in:
Paul Hübner 2026-01-20 13:34:46 +01:00
parent d9db4fb36e
commit 66c503625d
3 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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.