IntelliJ IDEA 2016.2 Help

Increasing Memory Heap

To prevent the build process from running out of memory, you can increase the amount of memory allocated to the process. By default, the memory heap is 128 MB, but for large projects you may need more.

In this section:

Increasing memory heap of the build process

  1. Open the Build File Properties dialog box.
  2. In the Maximum heap size field, type the required amount of memory.

Important notes

Please note the following:

The memory heap of the build process is independent of IntelliJ IDEA memory heap, and is released after the build process is complete.

The memory heap available to IntelliJ IDEA may be changed by editing the corresponding VM options.

To avoid editing files in the IntelliJ IDEA installation folder, one should:

  1. Do one of the following:
    • Use the main menu command Help | Edit Custom VM Options to create a copy of the idea.vmoptions file in the user home. Refer to Edit Custom VM Options for details.
    • Copy the existing file from the IntelliJ IDEA installation folder somewhere and save the path to this location in the environment variable IDEA_VM_OPTIONS.
    • Copy the existing file <IntelliJ IDEA installation folder>/bin/idea$BITS.vmoptions from the IntelliJ IDEA installation folder into the location under user home.
  2. Edit this file in the new location.

If IDEA_VM_OPTIONS environment variable is defined, or the *.vmoptions file exists, then this file is used instead of the one located in the IntelliJ IDEA installation folder.

See Also

Last modified: 5 September 2016