How to avoid Java Heap OutOfMemoryError Exception?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I am running a large amount of code in Matlab 2010b with Java 1.7.0_55-b13, to build a dataset for machine learning. The code is based on CERR (www.CERR.info), it opens, modifies and saves structures containing DICOM fields and large matrices. After running the code via a GUI on about 100 files, the code slows down and the following error appears:
_
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
Exception in thread "RequestQueue for GenericFileList" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
??? Error using ==> drawnow
UIJ_AreThereWindowShowsPending - timeout waiting for window to show up_
I have already increased the java Heap size to the maximum via the Matlab preferences, and i call the garbage collector regularly. I have monitored the java memory using the jConsole, and it shows that the threads are stable, there are no objects pending finalisation, but the Java Heap memory steadily increases as does the number of classes. Memrory Pools 'CMS old Gen' and "Code cache" also keep increasing increasing. Is there anything i can modify in the code to avoid this? For example list or delete java objects? Any help would be very much appreciated. Thank You!
B
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Call Java from MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!