Meaningless Drivel is fun!*
The moose likes IDEs, Version Control and other tools and the fly likes what is the maximum heap size possible to allocate in an IDE ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "what is the maximum heap size possible to allocate in an IDE ?" Watch "what is the maximum heap size possible to allocate in an IDE ?" New topic
Author

what is the maximum heap size possible to allocate in an IDE ?

yogesh dalal
Greenhorn

Joined: Nov 04, 2011
Posts: 1

Hi,

I am using Eclipse Helios. I run a heavy java program and got out of memory exception. I increase the heap size to -Xmx2048m by specifying in the eclipse.ini file.
But when i try to run the eclipse, i get error. "couldn't create java virtual machine".

So I am wondering what is the maximum heap size that can be allocated for a java program in any IDE.

I know its an open end questions. but it would be great if you can tell the maximum heap size you have used in java development.

Thanks for the help.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959
    
  19

Welcome to the JavaRanch, Yogesh!

Actually, that's the wrong question. The IDE itself is running in the same VM that the apps in the IDE are running in, so the real question would be "what is the maximum heap size possible to allocate in a VM?

And the answer to that depends on what VM you are running: 32-bit or 64-bit and the available system RAM.

In practical terms, a busy Eclipse IDE machine does need 2-3GB of total system RAM, so it may be time to go hardware shopping.


Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

If you are using a 32-bit JVM, the max heap size is usually around 1.5GB on Windows and around 2GB(not sure on this one) on Linux. The exact amount varies depending on the exact version of the OS (including patch levels), and on other variables such as the amount of permgen space allocated. If you are using a 64-bit JVM, the heap is limited only to the amount of RAM plus swap space that you have.

If your app is really that memory hungry, you should run it in a separate JVM.


JBoss In Action
Rahul M Mishra
Greenhorn

Joined: Jul 02, 2012
Posts: 10
I believe you are looking for this
JVM Maximum Heap Size
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what is the maximum heap size possible to allocate in an IDE ?
 
Similar Threads
Maximun Heap Size in WAS 7.0
Increase JVM heap size of eclipse
how to increase/decrease the heap size in java in windows
OutOfMemoryError in a 1GB RAM machine
java.lang.OutOfMemoryError: Java heap space