On Wed, 11 Nov 2020 13:50:08 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> src/hotspot/share/runtime/synchronizer.cpp line 246: >> >>> 244: // >>> 245: // Start the ceiling with the estimate for one thread: >>> 246: jint _in_use_list_ceiling = AvgMonitorsPerThreadEstimate; >> >> Why is this a jint when you use size_t for its accessor and all the other >> sizes that you compare with the ceiling are also size_t? >> I'm not sure size_t is right to use in these cases (do we really expect >> different maximums on 32-bit versus 64-bit?) but it should be all or none >> IMO. > > 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'. ------------- PR: https://git.openjdk.java.net/jdk/pull/642