tags:

views:

196

answers:

3

I'm trying to run an algorithm that requires a few hundred megabytes of memory within eclipse, and I've specified VM arguments -Xmx512m, but I can't get past some arbitrary memory limit which seems to decrease as I continually try to run my programs. Physical memory is fine...what could be the issue?

A: 

You should ensure that you are specifying the arguments for your test application in the Run Dialog, and not in arguments to Eclipse itself.

akf
+1  A: 

Look at the arguments -Xms too. Be sure that the argument is specify to your Run mode ( Run / debug).

If you still have some problem, you can use a profiler to see what happen in memory, or just logging the Runtime.getRuntime().freeMemory() can help.

Nettogrof
I've tried -Xms, but that still didn't help. I really hope Runtime.getRuntime().freeMemory() isn't necessary, but thanks for the tip regardless.
Stefan Kendall
+4  A: 
Rich Seller
I've added another property for you to try.
Rich Seller
I was indeed creating lots of class objects.
Stefan Kendall