RFR: 8280761: UseCompressedOops should be set after limit_heap_by_allocatable_memory

Thomas Schatzl tschatzl at openjdk.java.net
Wed Apr 6 11:21:40 UTC 2022


On Thu, 24 Mar 2022 06:52:34 GMT, KIRIYAMA Takuya <duke at openjdk.java.net> wrote:

> I fixed to set UseCompressedOops flag after limit_heap_by_allocatable_memory(). 
> So when ulimit -v is called and -XX:MaxRAM is set, UseCompressedOops does not become false. 
> And all hotspot tier1 test are passed.
> Would you please review this fix?

The code will not compile on anything but 32 bit platforms. Here's a result on linux-x64:


.../src/hotspot/share/runtime/arguments.cpp: In static member function 'static void Arguments::set_heap_size()':
.../src/hotspot/share/runtime/arguments.cpp:1826:11: error: 'reasonable_max' was not declared in this scope
 1826 |       if (reasonable_max > max_coop_heap) {


`reasonable_max` used within the `_LP64` block, and the change ends the scope it is declared in at line 1795. This also results in the entire block in the `_LP64` block to be misaligned. I believe (without checking), the closing brace at 1795 has been intended to stay in line 1842.

Please fix.

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

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



More information about the hotspot-gc-dev mailing list