RFR: 8357086: os::xxx functions returning memory size should return size_t [v29]
Anton Artemov
duke at openjdk.org
Thu Aug 21 08:48:27 UTC 2025
On Thu, 21 Aug 2025 01:14:48 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8357086: Addressed reviewer's comments
>
> src/hotspot/os/windows/os_windows.cpp line 869:
>
>> 867: return true;
>> 868: } else {
>> 869: assert(false, "GlobalMemoryStatusEx failed in win32::available_memory(): %u", ::GetLastError());
>
> Suggestion:
>
> assert(false, "GlobalMemoryStatusEx failed in win32::available_memory(): %lu", ::GetLastError());
>
> There is no consistency here but the primary ways we print `GetLastError` are using `%lu`, `%ld` or `%d`.
Addressed by usage of `%lu`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25450#discussion_r2290343762
More information about the hotspot-dev
mailing list