On Wed, 11 Nov 2020 15:23:15 GMT, Daniel D. Daugherty <dcu...@openjdk.org> 
wrote:

>> Our int types are really confused.  AvgMonitorsPerThreadEstimate is defined 
>> as an intx which is intptr_t and the range of it is 0..max_jint which is 0 
>> .. 0x7fffffff . jint is long on windows (the problematic type) and int on 
>> unix.  Since this is a new declaration, it probably should be something 
>> other than jint but what?
>> At any rate, it should be declared as 'static'.
>
> @coleenp - Nice catch on the missing 'static'.

I typically use size_t for entities that can scale with the size of the 
machine's memory, so I don't have to think about whether there are enough bits. 
Could AvgMonitorsPerThreadEstimate be uintx instead of intx? And then maybe we 
don't need to declare a range, as the natural range of the uintx seems 
perfectly valid.

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

PR: https://git.openjdk.java.net/jdk/pull/642

Reply via email to