Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is java PermGen space part of the total VM memory? [duplicate]

Assuming I start my java VM with the following parameters:

-Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m

Do the 512m PermGen space add to the 1024m memory or are they part of it? Or in other words, do I have a total memory consumption of 1536m or of 1024m? In the latter case, does that mean that the application has only 512m for purposes other than PermGen space?

Please let me know in case this question reveals a lack of understanding PermGen space. ;-)

like image 537
Jörg Brenninkmeyer Avatar asked Nov 19 '10 09:11

Jörg Brenninkmeyer


1 Answers

The -Xms and -Xmx parameters refer to heap memory, whereas the PermGen space is a separate memory pool.

In other words, the total memory size available to your Java application will be 1.5 GiB rather than 1 GiB, and you'll get the full gigabyte of space for heap-allocated objects.

like image 196
Andrzej Doyle Avatar answered Oct 22 '22 23:10

Andrzej Doyle