• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
Oracle Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe you are looking for this
JVM Maximum Heap Size
 
reply
    Bookmark Topic Watch Topic
  • New Topic