Cannot increase Java Heap Space despite lots of RAM available
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Christopher Brown
el 19 de Sept. de 2016
Comentada: Christopher Brown
el 22 de Sept. de 2016
Hello
I'm processing large amounts of brain imaging data and getting this error:
Java exception occurred: java.lang.OutOfMemoryError: Java heap space
I've tried many strategies to increase the Java head space, as suggested here: https://uk.mathworks.com/matlabcentral/answers/92813-how-do-i-increase-the-heap-space-for-the-java-vm-in-matlab-6-0-r12-and-later-versions
However, even after changing the heap space to 2Gb, or to 4Gb (I have a total of 16Gb RAM) via Matlab preferences, and restarting Matlab, when I query the amount of heap space in the command window (using java.lang.Runtime.getRuntime.maxMemory/1e9) I always get "0.9846", no matter what I set the heap space to in Preferences. Why is this? I presume this is the source of my problem.
I've tried this in both versions 2016a and 2014a installed on my workstation.
Many thanks Chris
2 comentarios
Jordan Ross
el 21 de Sept. de 2016
Hi Christopher,
When you open up the preferences after restarting does it show the heap value you set it to? Or does it show 984.6MB?
Also make sure that you are pressing "Apply" after you modify the Java Heap size in the preferences menu.
Lastly, try closing all other applications and see if your max memory increases.
Respuestas (0)
Ver también
Categorías
Más información sobre Subplots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!