Adrian Pop
Adrian Pop

Reputation: 285

IntelliJ set heap size over 4GB. How to?

I'm using IntelliJ 14.3 on x64 Java. Available memory: 10Gb (out of 16Gb total RAM)

(Basically set -Xmx8000M or greater)

The problem is I need more than 4Gb memory to use for an App. I can not find any answer or solution to my problem and I've looked for days.

I've been looking on stackoverflow for people asking the same question, but they had problems with the default value -Xmx512M and they kept linking to other answers, linking to another answer (waste of time and no solution so far).

I tried the following things that did not work:

*Note:

If anyone ran into this issue and can suggest solutions, I politely ask them to do so.

Upvotes: 6

Views: 13398

Answers (3)

ThomaRYLi
ThomaRYLi

Reputation: 51

What worked for me was the following:

  1. Help -> Edit Custom VM Options, change to -Xmx8000M
  2. restart IntelliJ
  3. Run -> Edit Configurations -> Application -> your main class -> Configuration, add -Xmx8000M in the VM Options field.

Doing only 1) or 3) but not both didn't work for me.

Upvotes: 5

RezaG
RezaG

Reputation: 31

Adding -Xmx10000M option to the bellow location worked for me: "Intellinj Idea -> Run -> Edit Configuration -> Modify Options -> Add VM Option"

Upvotes: 3

yole
yole

Reputation: 97133

To specify the memory used by the app, specify the needed -Xmx option in the "VM options" field of the run configuration you use to start the app from IntelliJ IDEA.

Upvotes: 1

Related Questions