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

Thomas Stuefe stuefe at openjdk.org
Tue Feb 3 08:00:06 UTC 2026


On Tue, 3 Feb 2026 07:44:09 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> > The current limit gives us 4GB of encoding space; that is enough (with -UseCompressedKlassPointers) for roughly 5-6 million classes, possibly more. What scenario would require more classes than that?
> 
> The problem is that CDS stuffs all data (not just Klasses) into the ro/rw regions, which are mapped into the compressed class space. If we want to support millions of classes, we would need to split the classes out into its own region, and map only that into the CCS.

Ah, right. This is an issue. It would be very nice to solve that. How complex would it be?

> 
> In any case, supporting very large set of classes is not our priority. I think it's OK to make small tweaks to allow more classes, but we won't have time for more drastic changes.

I tend to agree. The implications of increasing the nK encoding size make me apprehensive. I am all for tweaking the dividing line, though. Similar to how we did for https://bugs.openjdk.org/browse/JDK-8332514, just into the other direction. That should be simple enough. In fact, I would have assumed that already works.

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

PR Comment: https://git.openjdk.org/jdk/pull/29494#issuecomment-3839684485


More information about the hotspot-dev mailing list