I get java.lang.OutOfMemoryError exception in Eclipse. I know that Eclipse uses 256M heap size by default. I try to increase it, but nothing happens.
For example: eclipse -vmargs -Xmx16g -XX: PermSize = 2g -XX: MaxPermSize = 2g
I also tried different settings, using only the -Xmx option, using different cases from g, G, m, M, different memory sizes, but nothing helps. I also tried to specify the values in the eclipse.ini file. It doesn't matter what options I specify, the heap exception is thrown at the same time, so I assume that I'm doing something wrong, that Eclipse is ignoring the -Xmx option. I use 32 GB of RAM and try to do something very simple, for example:
double [] [] a = new double [15000] [15000];
It only works when I reduce the size of the array to about 10,000 by 10,000.
I work on Linux and use the top command, I can see how much memory the Java process consumes; it is less than 2%.
Thank!
source
share