0

Running jmap on a java process shows MaxHeapSize as 3GB, see below

Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize      = 3221225472 (3072.0MB)

However, when summing up capacity for the respective areas as

Eden Space:
  capacity = 53542912 (51.0625MB)
  ...
From Space:
  capacity = 73728000 (70.3125MB)
  ...
To Space:
  capacity = 76283904 (72.75MB)
  ...
PS Old Generation
  capacity = 1065353216 (1016.0MB)
  ...
PS Perm Generation
  capacity = 253755392 (242.0MB)
  ...

it results in a total capacity of 1452.125MB.

Why doesn't the total capacity sum up to MaxHeapSize?

trincot
  • 317,000
  • 35
  • 244
  • 286
HenrikJson
  • 15
  • 3

1 Answers1

1

Current capacity != Maximum possible capacity. The GC can resize memory regions as it deems fit to meet various goals.

the8472
  • 40,999
  • 5
  • 70
  • 122