RFR: 8365256: RelocIterator should use indexes instead of pointers

Vladimir Kozlov kvn at openjdk.org
Mon Aug 11 16:07:15 UTC 2025


On Mon, 11 Aug 2025 16:03:24 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> src/hotspot/share/code/nmethod.cpp line 2156:
>> 
>>> 2154:   os::free(_immutable_data);
>>> 2155:   _immutable_data = nullptr;
>>> 2156: 
>> 
>> `free` and `delete` on null pointers are OK, no need to check.
>
> May be add `_immutable_data_size = 0` for completeness.

Since `delete` allowing nullptr may be remove the check when `delete _pc_desc_container` too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26569#discussion_r2267263607


More information about the hotspot-compiler-dev mailing list