RFR: 8297718: Make NMT free:ing protocol more granular [v2]
David Holmes
dholmes at openjdk.org
Thu Dec 8 02:39:16 UTC 2022
On Wed, 7 Dec 2022 16:44:29 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with 10 additional commits since the last revision:
>>
>> - Add test that asserts block integrity after revival
>> - Make MallocHeader NONCOPYABLE
>> - Rest of it
>> - Adjust comments
>> - Put back comment, suitably rewritten
>> - Note reversibility of mark_block_as_dead
>> - Rename record_free_block to record_free
>> - Rename record_free to deaccount
>> - Move FreePackage into MallocHeader and rename
>> - Rename as revive, delete copy ctr
>
> src/hotspot/share/runtime/os.cpp line 732:
>
>> 730: // We have however marked it as dead, revert this change.
>> 731: header->revive();
>> 732: return nullptr;
>
> This is the very first usage of `nullptr` instead of `NULL`, and we now have a mix of both.
>
> Was this a deliberate choice? Should we then switch all `NULLs` to `nullptr` in here?
We should try to use `nullptr` in new code and change from NULL within those methods for consistency, but a broader cleanup should be done as a separate cleanup RFE.
-------------
PR: https://git.openjdk.org/jdk/pull/11390
More information about the hotspot-runtime-dev
mailing list