When the runtime heap and dump time heap have different sizes, it's possible that the archived heap regions are mapped to the middle of the runtime heap. Because the archived heap regions are pinned, this could reduce the size of the largest "humongous" array allocation.
In the worst case, the maximum allocatable array length may be half of the optimal value.
The condition that needs to be changed is here:
http://hg.openjdk.java.net/valhalla/valhalla/file/a3f98752448c/src/hotspot/share/memory/filemap.cpp#l947
if (!heap_reserved.contains(range)) { <<<<<<<< HERE: change to "not at the top end"
log_info(cds)("CDS heap data need to be relocated because");
log_info(cds)("the desired range " PTR_FORMAT " - " PTR_FORMAT, p2i(range.start()), p2i(range.end()));
log_info(cds)("is outside of the heap " PTR_FORMAT " - " PTR_FORMAT, p2i(heap_reserved.start()), p2i(heap_reserved.end()));
_heap_pointers_need_patching = true;
}
In the worst case, the maximum allocatable array length may be half of the optimal value.
The condition that needs to be changed is here:
http://hg.openjdk.java.net/valhalla/valhalla/file/a3f98752448c/src/hotspot/share/memory/filemap.cpp#l947
if (!heap_reserved.contains(range)) { <<<<<<<< HERE: change to "not at the top end"
log_info(cds)("CDS heap data need to be relocated because");
log_info(cds)("the desired range " PTR_FORMAT " - " PTR_FORMAT, p2i(range.start()), p2i(range.end()));
log_info(cds)("is outside of the heap " PTR_FORMAT " - " PTR_FORMAT, p2i(heap_reserved.start()), p2i(heap_reserved.end()));
_heap_pointers_need_patching = true;
}
- relates to
-
JDK-8208658 Make CDS archived heap regions usable even if compressed oop encoding has changed
-
- Resolved
-
-
JDK-8214280 FileMapInfo::map_heap_regions_impl fails to relocate archive regions to runtime heap top in some cases
-
- Closed
-