Integrated: 8332514: Allow class space size to be larger than 3GB

Thomas Stuefe stuefe at openjdk.org
Mon Jun 3 09:29:11 UTC 2024


On Wed, 22 May 2024 12:05:28 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Class space size is capped at 3GB. Technically, the Klass encoding range is 4GB.
> 
> We cap class space at 3GB to leave breathing room for CDS. However, CDS needs a lot less, so we waste address space. In addition, class space is unnecessarily capped at 3GB even if we run without CDS, which is unnecessary.
> 
> What we should do instead:
> - if CDS is off, use the full 4GB
> - if CDS is on, use as much memory as we can after accommodating the archive
> 
> This patch implements that new behavior. 
> 
> Now, we can have 4GB class space without CDS; with CDS, a bit less (depends on the CDS archive size; by default, on MacOS, we reach about 3.98GB).

This pull request has now been integrated.

Changeset: b1015862
Author:    Thomas Stuefe <stuefe at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/b10158624bd0cfe009f0fe7f2a06ee08e654766b
Stats:     153 lines in 3 files changed: 101 ins; 21 del; 31 mod

8332514: Allow class space size to be larger than 3GB

Reviewed-by: iklam, dholmes

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

PR: https://git.openjdk.org/jdk/pull/19347


More information about the hotspot-runtime-dev mailing list