RFR: 8376125: Out of memory in the CDS archive error with lot of classes [v3]

Ioi Lam iklam at openjdk.org
Tue Feb 3 04:01:02 UTC 2026


On Sun, 1 Feb 2026 03:47:08 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> src/hotspot/share/cds/aotMetaspace.cpp line 2102:
>> 
>>> 2100:     unmap_archive(mapinfo);
>>> 2101:     return MAP_ARCHIVE_OTHER_FAILURE;
>>> 2102:   }
>> 
>> Since `ArchiveUtils::OFFSET_SHIFT` is a constant for this JVM build, there's no need to save it into the archive and validate the saved value at runtime. We don't perform such checks for other constants.
>> 
>> The archive contains the VM version string, so it cannot be used by a different JVM build.
>
> Make sense to me.  Updated.
> 
> Is it OK to keep the CURRENT_CDS_ARCHIVE_VERSION stay as 19 in src/hotspot/share/include/cds.h?
> 
> - #define CURRENT_CDS_ARCHIVE_VERSION 19
> + #define CURRENT_CDS_ARCHIVE_VERSION 20

Since the header has not been changed, I think we should leave the version number unchanged.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29494#discussion_r2757071704


More information about the hotspot-dev mailing list