2

Where in Eclipse's Run Configuration can I specify for the project to run using 3G of my ram? and how do I do it? (what is the flag or command?)

Peggy
  • 394
  • 6
  • 22

1 Answers1

4

In Run Configurations, you go to the Arguments Tab, and then add to the "VM arguments" text field

-Xmx3g

That will run your program with a max of 3 GBytes of heap

David Hofmann
  • 5,683
  • 12
  • 50
  • 78
  • 4
    And make sure you're running on a 64-bit machine with 64-bit Java and 64-bit Eclipse, or you won't get 3GB. – Jim Garrison Jul 02 '13 at 20:31
  • what is the difference between -Xmx and -Xms?! @David Hofmann – Peggy Jul 02 '13 at 20:36
  • 1
    Xms is the amount of starting heap ram, and Xmx is the maximun it can take. I think that even if you put Xms to 3gb it won't really consume the whole at once. but I am not sure – David Hofmann Jul 02 '13 at 20:38