Search code examples
javaintellij-idea

How should I set the memory for IntelliJ 14?


I just upgraded my IntelliJ to 14.0.3. But there's always an Out Of Memory dialog popped up to ask me to set the memory.

Following is my settings: enter image description here

I thought it's enough. But the dialog shows from time to time, and sometimes, it's not responding that I have to shutdown it.

How should I set this for IntelliJ 14? Any ideas?


Solution

  • Open Intellij IDE's vmoptions file

    For Mac Users

    Help | Edit Custom VM Options...

    or

    Library > Preferences > Idea<YourVersion> > idea.vmoptions

    For Window (32bit) Users

    C:\Program Files (x86)\JetBrains\IntelliJ IDEA <your_version>\bin\idea.exe.vmoptions

    For Window (64bit) Users

    C:\Program Files (x86)\JetBrains\IntelliJ IDEA <your_version>\bin\idea64.exe.vmoptions

    and setup it's memory as you wish. Below is sample settings for 2GB

    -Xms128m
    -Xmx2048m
    -XX:MaxPermSize=350m
    -XX:ReservedCodeCacheSize=240m
    -XX:+UseCodeCacheFlushing
    -XX:+UseCompressedOops
    

    Hopefully this help.