Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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}


They also can't be enabled with >32GiB heaps.


I 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_compres...


They can if you increase the object alignment, but that's generally not advisable and should only be done when measurements show a benefit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: