Eclipse Out Of Memory Error explains about How To Solve Eclipse Out Of Memory Error
For correcting the memory problem you need to change the VM arguments into your JRE
You need to navigate to Eclipse -> Window -> Preference -> Java -> Installed JREs
Now click the edit button and change the values of Default VM (Virtual Machine) Arguments.
Please see the screen shot below
You can also see an example of Increasing Heap Size in Eclipse in order to avoiding OutOfMemoryError