Eclipse Java Out of Memory error

Was getting a java out of memory error in Eclipse every time I tried to install a new plugin. Something about the java heap which usually resulted in Eclipse needing to be restarted. If you google it you’ll plenty of solutions but, just for reference, in my case it was editing Eclipse.ini to make more memory available. Changed -xmx from 256m to 500m and the same for launcher.XXMaxPermSize.