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?)
Asked
Active
Viewed 359 times
2

Peggy
- 394
- 6
- 22
-
1You need to use -Xms and -Xmx flags in VM arguments. – kosa Jul 02 '13 at 20:29
-
@Nambari thanks for the answer, so it's just -Xms 3g then? – Peggy Jul 02 '13 at 20:31
-
1Yes that is correct. http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Flaunchers%2Farguments.htm – kosa Jul 02 '13 at 20:32
-
@BrendanLong: `eclipse.ini` doesn't control memory limits for the programs you launch... it only controls eclipse memory limits. – jlordo Jul 02 '13 at 20:33
-
http://stackoverflow.com/questions/1493913/how-to-set-the-maximum-memory-usage-for-jvm – surfealokesea Jul 02 '13 at 20:33
-
Why are you doing this in the first place? 3GB seems to be a lot of ram to test in eclipse. – David Hofmann Jul 02 '13 at 20:39
-
1yeah, it is this _rescue agent simulation_ code. it really needs at least 3G! – Peggy Jul 02 '13 at 20:44
1 Answers
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
-
4And 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
-
-
1Xms 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