-
Enhancement
-
Resolution: Fixed
-
P4
-
12
-
b18
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:
https://github.com/openjdk/jdk/blob/104e925dfdac0af3b1c6862f9a7d3442484f9241/src/hotspot/share/memory/filemap.cpp#L1835
if (!CompressedOops::is_in(range)) {
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(CompressedOops::begin()), p2i(CompressedOops::end()));
_heap_pointers_need_patching = true;
>>>> Add
} else if (header()->heap_end() != CompressedOops::end()) {
log_info(cds)("CDS heap data need to be relocated to the end the runtime heap to reduce fragmentation");
}
<<<< end
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:
https://github.com/openjdk/jdk/blob/104e925dfdac0af3b1c6862f9a7d3442484f9241/src/hotspot/share/memory/filemap.cpp#L1835
if (!CompressedOops::is_in(range)) {
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(CompressedOops::begin()), p2i(CompressedOops::end()));
_heap_pointers_need_patching = true;
>>>> Add
} else if (header()->heap_end() != CompressedOops::end()) {
log_info(cds)("CDS heap data need to be relocated to the end the runtime heap to reduce fragmentation");
}
<<<< end
- duplicates
-
JDK-8239089 LargeCopyWithMark.java failed due to OutOfMemoryError
-
- Closed
-
- relates to
-
JDK-8208658 Make CDS archived heap regions usable even if compressed oop encoding has changed
-
- Resolved
-
-
JDK-8267703 runtime/cds/appcds/cacheObject/HeapFragmentationTest.java crashed with OutOfMemory
-
- Resolved
-
-
JDK-8239089 LargeCopyWithMark.java failed due to OutOfMemoryError
-
- Closed
-
-
JDK-8214280 FileMapInfo::map_heap_regions_impl fails to relocate archive regions to runtime heap top in some cases
-
- Closed
-
(2 links to)