The IDE automatically determines the default limit for memory heap size for the JVM in which it is running, based on the amount of memory available on the system. The heap size should be adequate if you are developing C/C++ applications with up to 100 source files. If you are developing applications with more than 100 source files, you need to increase the heap size or you might get out of memory exceptions from the built-in parser.
You can set the heap size for the JVM on which the IDE runs in the netbeans.conf file.
To change the heap size:
# command line switches netbeans_default_options="-J-Xms32m -J-Xmx512m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
The recommended heap sizes for working with medium-sized and large C/C++ applications are:
To insure that you do not run out of memory while the built-in parser is running, you can also add the garbage collector switches -J-XX:+UseConcMarkSweepGC (concurrent collector) and -J-XX:+UseParNewGC (parallel collector) to the netbeans.conf file.