I could understand that with compressed oops , we can only use 32 GB of RAM. Is there someway i can use more than that like by allocating 2 heap or something ?
Thank
You can use larger heap sizes with an additional parameter:
-XX:ObjectAlignmentInBytes=alignment
This parameter is a fixed adjustment of Java objects. The default value is 8
(bytes). The indicated value has to be a power of two, and ranges from 8
to 256
.
The heap size limit in bytes is calculated as:
4GB * ObjectAlignmentInBytes
A 64GB heap size will be available for compressed pointers with the following line:
-XX:ObjectAlignmentInBytes=16
There is a note to be considered in the documentation for larger heap sizes though:
Note: As the alignment value increases, the unused space between objects will also increase. As a result, you may not realize any benefits from using compressed pointers with large Java heap sizes.