RFR(S): 8180039: Use more portable print format/arguments for rlim_t
Mikael Gerdin
mikael.gerdin at oracle.com
Wed May 10 06:21:08 UTC 2017
Hi Mikael
On 2017-05-10 01:38, Mikael Vidstedt wrote:
>
> Please review this small change which updates the code in the
> print_rlimit_info method in os_posix.cpp which prints out
> rlim_t/rlim_cur values (returned from getrlimit) to use more portable
> format specifiers and arguments/argument types.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8180039
> Webrev: http://cr.openjdk.java.net/~mikael/webrevs/8180039/webrev.00/hotspot/webrev/
Looks good.
/Mikael
>
> The spec says that rlim_t is an "unsigned integer type”, so casting it
> to a uint64_t will either zero extend it (if the rlim_t type is 32-bit),
> or end up with the exact same width/value (if rlim_t is 64-bit).
> Printing it out as a 64-bit unsigned type (using UINT64_FORMAT) will
> handle both the 64-bit case and the zero extended 32-bit case.
>
> Cheers,
> Mikael
>
More information about the hotspot-runtime-dev
mailing list