• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
yogesh dalal
Greenhorn
Posts: 1
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rahul M Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you are looking for this
JVM Maximum Heap Size
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic