Eclipse isn't using allotted heap; I get an out of memory error?-Collection of common programming errors

You are getting the OOME when running your code (as a Java application, or within a Java application server). This JVM is different from the JVM used by Eclipse, and will have it’s own Xms and Xmx values.

If you need to modify the settings for the launched process, you’ll need to modify the runtime configuration of the project to specify the arguments to the JVM explicitly. The default values in use may be insufficient for your application.