Currently, the archived java strings are mapped in the G1 "closed archive" region:
https://github.com/openjdk/jdk/blob/574b48c6925ebfb31345fc46c7d23aa4153f99b0/src/hotspot/share/gc/g1/heapRegionType.hpp#L80-L92
Objects in the closed archive region never move. This allows the _shared_table in stringTable.cpp to encode each archived string using a constant 32-bit integer (E.g., in the case of uncompressed oops, this is an offset from the lower end of the heap).
However, if we want to support mapping of the CDS heap in other collectors (JDK-8296263), it will be too complex to require each collector to implement something equivalent to the closed archive region.
================
Proposal:
We should change stringTable.cpp to store the archived strings in an objArray. That way, it's possible for the collector to move the archive strings. We can also get rid of the closed archive region from G1.
https://github.com/openjdk/jdk/blob/574b48c6925ebfb31345fc46c7d23aa4153f99b0/src/hotspot/share/gc/g1/heapRegionType.hpp#L80-L92
Objects in the closed archive region never move. This allows the _shared_table in stringTable.cpp to encode each archived string using a constant 32-bit integer (E.g., in the case of uncompressed oops, this is an offset from the lower end of the heap).
However, if we want to support mapping of the CDS heap in other collectors (
================
Proposal:
We should change stringTable.cpp to store the archived strings in an objArray. That way, it's possible for the collector to move the archive strings. We can also get rid of the closed archive region from G1.
- blocks
-
JDK-8298048 Combine CDS archive heap into a single block
-
- Resolved
-