jvm Specify heap region size


The latest JVMs supports Garbage First GC ( G1 GC) and consists of set of regions which accumulate to make young and old generation.

The JVM will have approximately 2048 reagions and set heap region size accordingly from 1 MB to 32 MB and power of 2 bounds. This is important parameter which decide what size of object that can be store in a region.

Heap region size = Heap size/2048

you can overwrite the adaptive selection of the region size by comand line JVM paramter -XX:G1HeapRegionSize=n