Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is vm option in netbeansproject properties?

what is vm option in Netbeans ? what is the meaning of each variable and memmory size of following line

-Xms128m -Xmx128m -XX:PermSize=64m -XX:MaxPermSize=128m

I got this line from stack-overflow troubling with permgen-space

any idea?

like image 735
Tibin Varghese Avatar asked Sep 10 '25 02:09

Tibin Varghese


1 Answers

The flag Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the initial memory allocation pool.

This means that your JVM will be started with Xms amount of memory and will be able to use a maximum of Xmx amount of memory.

The Xms flag has no default value, and Xmx typically has a default value of 256MB.

more information here

-XX:PermSize -XX:MaxPermSize are used to set size for Permanent Generation.

Permanent Generation: The Permanent Generation is where class files are kept. These are the result of compiled classes and jsp pages. If this space is full, it triggers a Full Garbage Collection. If the Full Garbage Collection cannot clean out old unreferenced classes and there is no room left to expand the Permanent Space, an Out‐of‐ Memory error (OOME) is thrown and the JVM will crash.

More information here

Starting with Java 8, both the permgen space and this setting are gone.

For netbeans options, have a look here and here

like image 124
Ankur Singhal Avatar answered Sep 13 '25 06:09

Ankur Singhal