Issue
I'm running my program from eclipse and using 64-bit java, but I still can't get it to allocate more than 2GB of memory. I'm running some benchmarks so I need a lot of memory.
I have this in my eclipse.ini: -Xmx8g
I want it to use all my memory. Could this be due to a 32-bit version of eclipse? I'm not sure what I have for eclipse.
I've tried sending in -Xmx8g to VMArgs when running the program. I'm running 64-bit windows 7 and a 64-bit JRE.
Solution
After trying everything else, it looked like VMArguments were simply not working in eclipse.
Changing the DEFAULT VM args within eclipse worked (finally!):
Inserting VM arguments into your JRE: while Eclipse is open, open up Preferences (for Windows: located under Window menu item. for Mac: located under Eclipse menu item), open the Java section, click on Installed JREs, click on the JRE being used (probably will be jre6), click on the Edit... button, and insert this into the Default VM Arguments:
-Xms256M -Xmx8192M
Answered By - Justin
Answer Checked By - Marilyn (JavaFixing Volunteer)