18

When I say -Xmx=1024m, does this include permgen i.e -XX:MaxPermSize= is taken from these 1024m or it is separate?

Looking at this I thought that it takes from 1024m, but until now I had believed they were separate.

Matt Fenwick
  • 48,199
  • 22
  • 128
  • 192
Vikas Madhusudana
  • 1,482
  • 1
  • 10
  • 20

2 Answers2

12

Nope, permGen space is in addition to main heap (latter capped via -Xmx on Sun VMs)

Nikita
  • 6,019
  • 8
  • 45
  • 54
7

Permanent generation is a separate space allocated via -XX:MaxPermSize=. This is in addition to the heap set with -Xmx.

See the diagram at http://www.oracle.com/technetwork/java/gc1-4-2-135950.html#3.%20Sizing%20the%20Generations|outline "3. Sizing the Generations"

This shows the "Total Size" i.e. Xmx does not count the Permanent generation.

And by the way, JDK 1.4 is quite old. Check the JDK 1.6 options and links for an updated view: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
JoseK
  • 31,141
  • 14
  • 104
  • 131