Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 23633

Summary: OutOfMemoryError - nothing documented in help system.
Product: [Eclipse Project] Platform Reporter: Andreas Krüger <andreas.krueger>
Component: DocAssignee: Platform-Doc-Inbox <platform-doc-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Mike_Wilson, stefan.berger
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Andreas Krüger CLA 2002-09-17 06:36:52 EDT
I suggest you should have hints in your help system what to do
in case an OutOfMemoryError strikes.  In particular, though not limited to,
how to increase the amount of virtual memory Eclipse will grab.

When working with Eclipse for some time, I tend to get a somewhat unspecified
error message pointing me to the logfile.  In there, I see I'm running against
a java.lang.OutOfMemoryError.

But, from the Windows task manager, I see that Eclipse is only
using some 100 Megabytes of virtual memory.  I'd gladly have it use more,
150 or 200, which would probably "cure" the problem in my particular case.

So I'm checking the documentation, i.e.,
to Eclipse help, I type OutOfMemoryError.

Nothing.

Poking around, especially in "Running Eclipse" -

still nothing.

(I'm presently experimenting with -vmargs -Xmx150m, but Eclipse has not yet
grabbed more memory than it used to, so the jury is still out on whether that's
going to do me any good.)
Comment 1 Andreas Krüger CLA 2002-09-17 06:55:45 EDT
Appearently, -vmargs -Xmx does the trick.

The JDK documentation (I'm using SUN 1.4.0) claims that the default value
is only 64MB.  Yet, Eclipse consistently grabs about 100 MB virtual RAM on
my system (before I used -vmargs -Xmx).  Does the Eclipse startup programm
change the value, or what's going on?

This too should be documented.
Comment 2 Andreas Krüger CLA 2002-11-19 04:55:57 EST
Someone asked me in private email how to go about adding arguments.

Other people may be having the same problem, so I answer it here in the open
(in a feeble attempt to reduce the amount of email I'm getting):
What I do is, call "eclipse.exe" with additional command line arguments.
The complete call, that has been working well for me for some time,
looks something like this in my case:

c:\eclipse\location\eclipse.exe -data c:\my\workspace\location -vmargs -Xmx100m

Personally, being a Perl affictionado, I use a small Perl script
with an "exec" statement to do this.  You should also be able to get by
with a simple .bat file.
Comment 3 Ralf Hauser CLA 2003-10-28 03:03:41 EST
thanks, this helped me a lot. The core "eclipsers" appear to discuss the same in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=33972
Comment 4 Mike Wilson CLA 2008-04-13 13:09:05 EDT
Hints are now provided in help for dealing with this. Searching for either "Running Eclipse" or will get you to a page that has suggested configurations.

Bug 33972 is an ongoing discussion how to better deal with OOMEs.