RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]
Yumin Qi
minqi at openjdk.java.net
Wed Oct 6 16:47:12 UTC 2021
On Wed, 6 Oct 2021 04:15:06 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Added a helper class to facilitate checking archive
>
> src/hotspot/share/cds/filemap.cpp line 1205:
>
>> 1203: }
>> 1204:
>> 1205: _header = (FileMapHeader*)os::malloc(gen_header->_header_size, mtInternal);
>
> There's no need to allocate and read the header again. It's already in gen_header. This should be enough:
>
>
> _header = (FileMapHeader*)gen_header;
see above reply. We need read the full _header_size for _header. Also note that helper class will delete gen_header when out of scope.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5768
More information about the serviceability-dev
mailing list