Eclipse Java Heap Memory size

Getting the Out of Memory error when running eclipse? Increase heap space using

eclipse -vmargs -Xmx<memory size>

but how do you do this in OSX? Surprisingly difficult to find out how to do this in OSX, but here it is:

If you are using Mac OS X, and launch eclipse using the Finder, the eclipse.ini in eclipse folder doesn’t have any effect. You need to open the Eclipse package (right click, show package content), open the Max OS folder, and edit the eclipse ini located there.