In eclipse.ini (in the main folder of eclipse) there is a bunch of parameters that should help you to configure the amount of memory. At the end of the file should be sth like this:
-vmargs
-Xms1024m
-Xmx2048m (max heap)
-Xss1m (stack)
You can add as many parameters as you need. All of them must be after the line
-vmargs
You can find more JVM parameters here