# Increase the memory heap of the IDE

> **TL;DR**
> `Help | Change Memory Settings`

The Java Virtual Machine (JVM) running IntelliJ IDEA allocates some predefined amount of memory. The default value depends on the platform. If you are experiencing slowdowns, you may want to increase the memory heap.

> **Note:**
> The heap size allocated for running the IDE is not the same as the heap size for compiling your application. If you want to configure the heap size for the build process that compiles your code, open Settings `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)), select `Build, Execution, Deployment | Compiler`, and specify the necessary amount of memory in the Shared build process heap size field.

Procedure:

1. In the main menu, go to `Help | Change Memory Settings`.

2. Set the necessary amount of memory that you want to allocate and click Save and Restart.

This action changes the value of the `-Xmx` option used by the JVM to run IntelliJ IDEA. Restart IntelliJ IDEA for the new setting to take effect.

> **Tip:**
> If the IDE crashes, you can change the value of the `-Xmx` option manually as described in [JVM options](tuning-the-ide.html#configure-jvm-options).

IntelliJ IDEA also warns you if the amount of free heap memory after a garbage collection is less than 5% of the maximum heap size:

![The Low Memory warning](https://resources.jetbrains.com.cn/help/img/idea/2026.2/LowMemoryWarning.png)

Click Adjust memory options to increase the amount of memory allocated by the JVM. If you are not sure what would be a good value, use the one suggested by IntelliJ IDEA.

![The Memory Settings dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/IncreaseMemoryHeap.png)

Click Save and Restart and wait for IntelliJ IDEA to restart with the new memory heap setting.

Procedure: Enable the memory indicator

IntelliJ IDEA can show you the amount of used memory in the [status
bar](guided-tour-around-the-user-interface.html#status-bar). Use it to judge how much memory to allocate.

* Right-click the status bar and select Memory Indicator.

## Toolbox App

If you are using the Toolbox App, you can change the maximum allocated heap size for a specific IDE instance without starting it.

Procedure:

1. Open the Toolbox App, click the settings icon next to the relevant IDE instance, and select Settings.

![Opening IDE instance settings in the Toolbox App](https://resources.jetbrains.com.cn/help/img/idea/2026.2/toolbox-app-open-settings.png)

2. On the instance settings tab, expand Configuration and specify the heap size in the Maximum heap size field.

If the IDE instance is currently running, the new settings will take effect only after you restart it.

If you are using a standalone instance not managed by the Toolbox App, and you cannot start it, it is possible to manually change the `-Xmx` option that controls the amount of allocated memory. Create a copy of the default [JVM options](tuning-the-ide.html#configure-jvm-options) file and change the value of the `-Xmx` option in it.

