4 ms·
On hotspot ergonomics automatically turn those options on as long as your max heap is < 32GiB. $ java -Xmx31G -XX:+PrintFlagsFinal 2>&1 | grep UseCompresse
by the8472 10y ago
On hotspot ergonomics automatically turn those options on as long as your max heap is < 32GiB.
$ java -Xmx31G -XX:+PrintFlagsFinal 2>&1 | grep UseCompressed
bool UseCompressedClassPointers := true {lp64_product}
bool UseCompressedOops := true {lp64_product}
- nalllar 10y agoThey also can't be enabled with >32GiB heaps.
- the8472 10y agoThey can if you increase the object alignment, but that's generally not advisable and should only be done when measurements show a benefit.
- bogomipz 10y agoI think it depends on the JVM. You can use compressed refs on JRokit with > 32G heaps. Its a bit of "bit twiddling." This article explains it pretty well: https://blogs.oracle.com/jrockit/entry/understanding_compressed_refer https://blogs.oracle.com/jrockit/entry/understanding_compres...