The 32-bit version of Java SE 6 is recommended for use on both 32-bit and 64-bit systems to avoid large memory use by the 64-bit JVM.
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 default heap size should be adequate if you are developing C/C++ applications with up to 5000 source files on a system with 2GB of RAM and a dual-core processor. If you are developing applications with more than 5000 source files, you need to increase the heap size or you might get out of memory exceptions from the IDE parser.
The recommended heap sizes for working with large C/C++ applications are as follows:
Size of project | Heap size |
---|---|
1 to 5000 files | Default |
5000 to 10000 files | 1.0 GB |
10000 or more files | 1.5 GB |
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-Xmx2g -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
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.