RFR: JDK-8301481: Replace NULL with nullptr in os/windows [v4]
Stefan Karlsson
stefank at openjdk.org
Wed Feb 8 09:46:59 UTC 2023
On Tue, 7 Feb 2023 02:35:03 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Can't directly compare uintptr_t, need reinterpret_cast
>
> src/hotspot/os/windows/gc/z/zVirtualMemory_windows.cpp line 142:
>
>> 140: const uintptr_t res = ZMapper::reserve(addr, size);
>> 141:
>> 142: assert(res == addr || res == reinterpret_cast<uintptr_t>(nullptr), "Should not reserve other memory than requested");
>
> Seems to me if the returned value is uintptr_t then this should be a check against zero not NULL/nullptr.
Yes, please change this to `res == 0`.
-------------
PR: https://git.openjdk.org/jdk/pull/12317
More information about the hotspot-dev
mailing list