RFR: 8340416: Remove ArchiveBuilder::estimate_archive_size()

Ioi Lam iklam at openjdk.org
Mon Jan 13 17:36:52 UTC 2025


On Wed, 6 Nov 2024 15:33:51 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:

> Hi folks, 
> 
> This PR removes ArchiveBuilder::estimate_archive_size() per the issues raised in [JDK-8340416](https://bugs.openjdk.org/browse/JDK-8340416). 
> 
> Thanks!
> Sonia

src/hotspot/share/cds/archiveBuilder.cpp line 306:

> 304: 
> 305: address ArchiveBuilder::reserve_buffer() {
> 306:   size_t buffer_size = CompressedClassSpaceSize;

CompressedClassSpaceSize is 1G by default. On 32-bit platforms, it may be difficult to reserve that much space. I think we should do this:


size_t buffer_size = LP64_ONLY() NOT_LP64(256 * M);


The 256M size is close to how much we were reserving on 32-bit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21931#discussion_r1913559083


More information about the hotspot-runtime-dev mailing list