UseCompressedOops UseCompressedClassPointers in jdk-13 and jdk-15
问题 Accidentally I have stumbled into a change in jdk-15 that I was not aware of. Suppose I have a very simple question: what is the size of an array of 3 intergers? For this, I use JOL. The code is fairly trivial: import org.openjdk.jol.info.ClassLayout; import org.openjdk.jol.vm.VM; public class Array { public static void main(String [] args){ int [] array = new int[3]; System.out.println(ClassLayout.parseInstance(array).toPrintable()); } } I run this with jdk-13 : java -Djdk.attach