RFR: 8376125: Out of memory in the CDS archive error with lot of classes [v10]
Ashutosh Mehra
asmehra at openjdk.org
Mon Feb 23 19:01:27 UTC 2026
On Mon, 23 Feb 2026 16:53:20 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> 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.
@iklam thanks for clarifying this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29494#discussion_r2842537627
More information about the serviceability-dev
mailing list