RFR: 8332514: Allow class space size to be larger than 3GB [v2]
Thomas Stuefe
stuefe at openjdk.org
Mon May 27 05:10:18 UTC 2024
> 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).
Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
- Remarks Ioi
- Merge branch 'master' into JDK-8332514-Allow-class-space-size-to-be-larger-than-3GB-if-possible
- fix 32-bit (why is this not a 64-bit only option)
- JDK-8332514-Allow-class-space-size-to-be-larger-than-3GB-if-possible
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19347/files
- new: https://git.openjdk.org/jdk/pull/19347/files/ba013f2f..2d33ad47
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19347&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19347&range=00-01
Stats: 17778 lines in 498 files changed: 11161 ins; 3624 del; 2993 mod
Patch: https://git.openjdk.org/jdk/pull/19347.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19347/head:pull/19347
PR: https://git.openjdk.org/jdk/pull/19347
More information about the hotspot-runtime-dev
mailing list