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

Ioi Lam iklam at openjdk.org
Mon Feb 23 16:56:04 UTC 2026


On Mon, 23 Feb 2026 16:28:01 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   merge the patch to always use narrowPtr
>
> src/hotspot/share/classfile/compactHashtable.hpp line 118:
> 
>> 116:   GrowableArray<Entry>** _buckets;
>> 117:   CompactHashtableStats* _stats;
>> 118:   u4* _compact_buckets;
> 
> I am not sure why are these changed from Array to C-array?

The reason is Array<u4> looks like this:


class Array<u4> {
    int length;
    u4 data[...];


As the `Array` is 8-byte aligned, the address of `data` is not aligned. As a result, we cannot serialize it using `WriteClosure::do_ptr()`, which now requires 8-byte alignment.

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

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


More information about the serviceability-dev mailing list