Large projects can push the Java heap in IntelliJ IDEA on the Linux desktop to its limit. Raising the maximum heap gives the IDE more room for indexing and code analysis when memory runs low.
The heap limit applies to the IDE's own Java process. Compilers and applications launched from the IDE can have separate memory settings.
A larger heap can leave less RAM for the operating system and other apps. Start with a modest increase that leaves enough memory for the rest of the desktop.
Steps to increase memory for JetBrains IDE:
Start with IntelliJ IDEA open and its main menu collapsed under the Main Menu button in the window header. PyCharm and PhpStorm also provide Help > Change Memory Settings.
- Click Main Menu at the left of the IntelliJ IDEA window header.

- Select Help in the expanded menu bar.

- Select Change Memory Settings from the Help menu.

- Replace the selected number in Maximum Heap Size with the higher limit you want in MiB.
The dialog shows the previous limit next to the field. The pictured change is from
2048to2560MiB. - Click Save and Restart in the Memory Settings dialog.
The IDE closes and reopens to apply the new limit. If it cannot start with the new limit, JetBrains documents how to restore the previous heap limit in the JVM options.
- Open Main Menu once the IntelliJ IDEA window returns.

- Select Help in the expanded menu bar of the reopened IDE.

- Select Change Memory Settings again.

- Confirm that the current value beside Maximum Heap Size matches the limit you entered.
The running IDE shows
2560MiB in the pictured example.