increase memory

        Runtime rt = Runtime.getRuntime();
        long totalMem = rt.totalMemory();
        long maxMem = rt.maxMemory();
        long freeMem = rt.freeMemory();
        double megs = 1048576.0;

        System.out.println ("Total Memory: " + totalMem + " (" + (totalMem/megs) + " MiB)");
        System.out.println ("Max Memory:   " + maxMem + " (" + (maxMem/megs) + " MiB)");
        System.out.println ("Free Memory:  " + freeMem + " (" + (freeMem/megs) + " MiB)");


If i run the above i get:

Total Memory: 85000192 (81.0625 MiB)
Max Memory:   129957888 (123.9375 MiB)
Free Memory:  76973192 (73.40735626220703 MiB)

If i run the same in processing, a very limited pde i get:

Total Memory: 65011712 (62.0 MiB)
Max Memory:   1908932608 (1820.5 MiB)
Free Memory:  57761176 (55.085350036621094 MiB)

Now how can i increase the available memory?

I tried so many things, in intelliJ i get:

Exception in thread "Animation Thread" java.lang.OutOfMemoryError: Java heap space

please help

4 comments

Hello.

If you mean memory for running IDEA, then please see: https://intellij-support.jetbrains.com/entries/23395793-Configuring-JVM-options-and-platform-properties

If you mean memory for running your application from IDEA, then edit your run configuration, VM options section.

Regards,
Alexander.

0

I mean for running the application.

I did the thing on the attached image but that didn't help.

Am i typing it wrong?



Attachment(s):
Screen Shot 2014-04-25 at 5.09.46 PM.png
0

These are settings for compiler process, to build class files. Do you need run settings? Please see main menu / Run / Edit run configuration, and find your configuration there.

Regards,
Alexander.

0

Please sign in to leave a comment.