Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase intellij 32bit xmx more than 1GB?

Tags:

I am using 32bit Intellij on my 32bit windows XP with 4 GB of RAM.
I am attempting to increase intellij xmx to 1.5GB : -Xmx1500m
So I know JVM support 1.5GB of RAM in 32bit systems.
But this error throws from JVM :

The JVM could not be started. The maximum heap size (-Xmx) might be too large ... 

I can't increase intellij Xmx more than 900MB
Please help me!

like image 395
Mohsen Kashi Avatar asked Nov 21 '12 08:11

Mohsen Kashi


People also ask

How do I change max heap size in IntelliJ?

Open the Toolbox App, click the settings icon next to the relevant IDE instance, and select Settings. On the instance settings tab, expand Configuration and specify the heap size in the Maximum heap size field.

What is Max Value XMX in IntelliJ?

-Xmx. 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 do I increase allocated heap size?

On Mac OSX one can easily change heap size by going to first menu item, Android Studio > preference > System Settings (left menu) > Memory Settings and change heap size there in the dialog.


1 Answers

You can't do it as JVM needs to allocate all the heap in a single continuous chunk, which may not be possible because of the memory fragmentation. See my FAQ article for more details.

See also this picture:

JVM heap

As you can notice, total process memory is not just the heap size, making it much easier to hit the 2GB OS limit.

The actual heap that can be used varies on the OS configuration and on other applications that are running (DLLs with hooks inject into process space and cause additional fragmentation). Usually it's somewhere between 512M and 1G, but can be higher on a clean system.

like image 66
CrazyCoder Avatar answered Sep 20 '22 06:09

CrazyCoder