RFR: 8281455: Change JVM options with small ranges from 64 to 32 bits, for gc_globals.hpp [v2]

Coleen Phillimore coleenp at openjdk.org
Fri Jun 9 14:48:52 UTC 2023


On Fri, 9 Jun 2023 08:44:38 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Maybe, it is because the `uint` is already defined within the guarded lines 149-154: 
>> ```C++
>> #ifdef __USE_MISC
>> /* Old compatibility names for C types.  */
>> typedef unsigned long int ulong;
>> typedef unsigned short int ushort;
>> typedef unsigned int uint;
>> #endif
>
> I'm not seeing such a block?  Neither in the current version nor in several recent versions.  And I didn't
> find `__USE_MISC` anywhere in the JDK.  I did find what it's for and where it's supposed to come from:
> https://stackoverflow.com/questions/10231885/what-is-use-misc-macro-used-for

I was curious and found it in /usr/include/x86_64-linux-gnu/sys/types.h on ubuntu. I guess it needs cleanup because it might not be defined with USE_MISC?  There are too many int type names to choose from for int.  Why does it say "Old compatibility names for C types."? Should we even be using uint ? I don't see it in https://en.cppreference.com/w/cpp/language/types - should we prefer "unsigned"?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14259#discussion_r1224382277


More information about the hotspot-gc-dev mailing list