Eclipse OutOfMemoryError

I was getting OutOfMemoryErrors when running Eclipse with multiple projects open. To solve the problem I added the following arguments to my quicklaunch:

eclipse -vmargs -Xms512m -Xmx1024m -Xss2m -XX:MaxPermSize=256m

Reference

-Xms

Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration.

-Xmx

Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration.

-Xss

Set thread stack size.

-XX:MaxPermSize

Specifies the the maximum size for the permanent generation heap, a heap that holds objects such as classes and methods.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Different types of OOM

Normally OOOM is seen as run out of memory in heap which is not true it can come due to not enough space in perm space also.here is a nice article which explains difference How to Solve Java.lang.OutOfMemoryError in PermGen Space

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.