Memory in Eclipse
        Posted  
        
            by user247866
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user247866
        
        
        
        Published on 2010-04-03T05:00:08Z
        Indexed on 
            2010/04/03
            5:03 UTC
        
        
        Read the original article
        Hit count: 391
        
I'm getting the java.lang.OutOfMemoryError exception in Eclipse. I know that Eclipse by default uses heap size of 256M. I'm trying 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 of g, G, m, M, different memory sizes, but nothing helps. Does not matter which params I specify, the heap exception is thrown at the same time, so I assume there's something I'm doing wrong that Eclipse ignores the -Xmx parameter. I'm using a 32GB RAM machine and trying to execute something very simple such as:
double[][] a = new double[15000][15000];
It only works when I reduce the array size to something around 10000 on 10000.
I'm working on Linux and using the top command I can see how much memory the Java process is consuming; it's less than 2%.
Thanks!
© Stack Overflow or respective owner