How to increase the memory heap size on IntelliJ IDEA?

I want to allocate around 1GB of heap size, but I can't seem to figure it out.

How to do this?

go to that path "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin\idea.exe.vmoptions" and change size to -Xmx512m-Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m -XX:+UseCodeCacheFlushing -ea hope its will work

go to that path "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin\idea.exe.vmoptions" and change size to -Xmx512m


hope its will work

Open the Build File Properties dialog. In the Maximum heap size field, type the required amount of memory. The memory heap of the build process is independent of the IntelliJ IDEA memory heap, and is released after the build process is complete. The memory heap available to IntelliJ IDEA may be changed using the corresponding JVM option.

For 64-bit Windows, make sure to run idea in 64 bit mode(idea64.exe) and change settings in "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\bin\idea64.exe.vmoptions" file. These settings works fine for me


after a lot of research I could not get a result. I'm new to IntelliJ IDEA, I use 11.1.2 version. I work with 3 modules (3 eclipse projects) and in each of them I setted Preferences -> Compiler -> Java Compiler with the following values: Maximum heap size (MB): 512. Additional command line parameters:

1). In inteli Go to File> Setting Option and Search for Vm Option In the field of Vm Option for Importer give value -Xmx512m. Intelij Setting Options. 2). Go to Control Pannel Select View by :Large icons then Go to Java one promp window will appear with name java control pannel then go to java Java VM Options.

In addition to what others have added, should the error persist try this

basically put what you want(as others have pointed out) in your run-config's vm options and apply

Analyze objects in the JVM heap. When debugging, you can use the Memory tab to view details of all objects in the heap. IntelliJ IDEA lets you track the instances and analyze the conditions that cause objects to spawn or be retained. This information is useful for detecting memory leaks and their causes.

If you are experiencing slowdowns, you may want to increase this value, for example, to set the value to 2048 megabytes, change this option to -Xmx2048m. -Xms. Specifies the initial memory allocated by the JVM for running IntelliJ IDEA. Default value depends on the platform.

I am using IntelliJ IDEA 2017.1.3. I need to increase the heap size of my Java Application. I have searched on the Internet. And the solutions didn't work. Method 1: run-edit configuration, I alter

Click Configure to increase the amount of memory allocated by the JVM: Click Save and Restart and wait for CLion to restart with the new memory heap setting. Enable the memory indicator´╗┐ CLion can show you the amount of used memory in the status bar.

  • Important to note that there is a 32bit and 64bit version of the config.
  • The links don't work anymore. Can you please try updating them? @CrazyCoder
  • @AdityaVikasDevarapalli I've updated the links, thanks
  • @CrazyCoder The java doc on the Oracle website says that -Xss option is used to increase thread stack space. How do I do it in IntelliJ since there is no entry as -Xss?
  • @KarthikBhat just add a line like -Xss4m in Help | Edit Custom VM Options. You should not change the default stack size unless you are getting StackOverflow exceptions, it will not give you any performance improvements, only consume more RAM.
  • When I change it I have this error code -4. What should I do here?
  • try to restart system
  • Using IntelliJ 13.1.2, restarting doesn't fix error code.
  • I got error code -4 when i increase -Xmx above 1024, so seems maximum value is 1024. Tried with Intellij 13.1.2
  • Intellij uses two JVMs. The the accepted answer is for your JAVA development/run configurations, this is for your IDE
  • this setting solved my issue on Mac OSX running pycharm.