Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 951
ocespedes Avatar asked Jun 20 '13 19:06

ocespedes


People also ask

How do I find my heap size in IntelliJ?

From the main menu, select View | Tool Windows | Profiler. Right-click the necessary process in the Profiler tool window and select CPU and Memory Live Charts. A new tab opens in which you can see the amount of resources the selected process consumes.

What is the maximum heap size in IntelliJ?

Limits the maximum memory heap size that the JVM can allocate for running IntelliJ IDEA. The default value depends on the platform. 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 .

How much memory should I allocate to IntelliJ?

IntelliJ IDEA memory usage Follow IntelliJ itself reports that it is using a little more than 1GB of heap but the OS reports that it is using anywhere from 3.5 to 4.5 GB.


2 Answers

Use Help | Edit Custom VM Options…

VM Options

An editor will open automatically for the right .vmoptions file, adjust the value of -Xmx, save and restart IntelliJ IDEA:

editor

Check these documents from IntelliJ IDEA knowledge base for more details:

  • Configuring JVM options and platform properties
  • The JVM could not be started. The main method may have thrown an exception.

Answers below suggest to edit .vmoptions file directly inside the application installation directory. Please note that it's not recommended since it will cause conflicts during patch updates. The method above creates a copy of the file in the CONFIG directory and your IDE installation remains intact.

Also be aware of the 32-bit address space limit on Windows which makes it hard to use heap sizes higher than 750m. Should you need to use larger heap, make sure to switch to the 64-bit JVM first, otherwise IDE may crash on start or start to crash randomly during work.

like image 99
CrazyCoder Avatar answered Sep 27 '22 19:09

CrazyCoder


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   -Dsun.io.useCanonCaches=false   -Djava.net.preferIPv4Stack=true 

hope its will work

like image 41
rinkesh Avatar answered Sep 27 '22 20:09

rinkesh