File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Performance and the fly likes OutOfMemoryError: Java heap space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "OutOfMemoryError: Java heap space" Watch "OutOfMemoryError: Java heap space" New topic

OutOfMemoryError: Java heap space

Rafael Angarita
Ranch Hand

Joined: Jan 09, 2009
Posts: 67
Hello everybody,

I'm writing a code generator as an Eclipse plugin using the framework Xtext for developing my DSL. My test project consist of 15000 source files. After doing some optimization specific to Xtext, I keep running into java.lang.OutOfMemoryError: Java heap space when I iterate over the objects representing my source files.

I'm learnig about GC and its related JVM parameters. Im trying this run configuration:

At first, It seems to go very well with an acceptable speed, but after awhile I get:

After it, the application gets really slow, and eventually I get:

I know "promotion failed" has to do with the generations of living objects, but I have experimented with different parameters for the Run Congifuration with no success.

I would really appreciate your help!

Thank you very much.

Rafael Angarita.
Ramon Anger
Ranch Hand

Joined: Apr 19, 2011
Posts: 56

Hi Rafael,

which JVM and which OS do you use?


Blackbelt on
I agree. Here's the link:
subject: OutOfMemoryError: Java heap space
It's not a secret anymore!