A Java optimization called compressed oops (ordinary object
pointers) enables a 64-bit JVM to address heap sizes up to about 32 GB
using 4-byte pointers. For larger heap sizes, 8-byte pointers are
required. This means that a heap size slightly less than 32 GB can hold
more objects than a heap size slightly more than 32 GB.
If you do not
need more than 32 GB heap, set your heap size to 31GB or less to avoid
this issue. If you need 32 GB or more, set your heap size to 48 GB or
higher to account for the larger pointers. In general, for heap sizes
above 32 GB, multiply the amount of heap you need by 1.5.