Out of memory error in Eclipse
1. Windows -> Preferences
2. Java -> Installed JREs
3. Select the JRE and click on Edit
4. Add the follwing in VM arguments -Xmx1024M (Depending on your memory size, you can specify any number)
Please ensure that you have minimum RAM of 2 GB to use 1024MB for your JVM.
Note: Be assured that your virtual memory settings are properly tuned up so that you can set VM allocation