The output of jmap command is shown below.
I wonder why the used value highlighted in red in Heap usage G1 Heap section is not the sum of the three values highlighted in blu (used in Eden Space, in Survivor Space and in Old Generation Space).
Have I misunderstood the output of jmap command? Or is there any error in calculation.
Can anyone help on this topic?
opt/jdk/bin/jmap -J-d64 -heap 9537
Attaching to process ID 9537, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.102-b14
using thread-local object allocation.
Garbage-First (G1) GC with 4 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 268435456 (256.0MB)
NewSize = 1363144 (1.2999954223632812MB)
MaxNewSize = 160432128 (153.0MB)
OldSize = 5452592 (5.1999969482421875MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 1048576 (1.0MB)
Heap Usage:
G1 Heap:
regions = 256
capacity = 268435456 (256.0MB)
used = 212237728 (202.40567016601562MB)
free = 56197728 (53.594329833984375MB)
79.06471490859985% used
G1 Young Generation:
Eden Space:
regions = 145
capacity = 167772160 (160.0MB)
used = 152043520 (145.0MB)
free = 15728640 (15.0MB)
90.625% used
Survivor Space:
regions = 1
capacity = 1048576 (1.0MB)
used = 1048576 (1.0MB)
free = 0 (0.0MB)
100.0% used
G1 Old Generation:
regions = 58
capacity = 99614720 (95.0MB)
used = 58097056 (55.405670166015625MB)
free = 41517664 (39.594329833984375MB)
58.32175806949013% used