Each JVM implementation had a different set of default and choose default settings based on the environment it runs in. It’s always good to know the default. Let’s see how to get the default. Using -XX:+PrintCommandLineFlags
1 2 |
bash-3.2$ java -XX:+PrintCommandLineFlags -XX:InitialHeapSize=67108864 -XX:MaxHeapSize=1073741824 -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC |
This is the output on my laptop. The JVM choose Compressed Oops and parallel GC. PrinCommandLineFlags provides a […]