Memory Requirements

 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:

  1. Copy the netbeans.conf from the etc folder in the NetBeans installation directory into the etc directory in your NetBeans user directory ($HOME/.netbeans/6.8/etc). You might need to create the etc directory.
  2. In the netbeans.conf file in your user directory, add the -J-Xmx command line Java startup switch (bolded below) in the netbeans.conf file, and then restart the IDE. In this example, the heap is set to 512 MB.
    # 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.


Legal Notices