Effacer les filtres
Effacer les filtres

Java Heap Space Memory Issue

5 vues (au cours des 30 derniers jours)
Furqan Hashim
Furqan Hashim le 9 Jan 2021
This question has been asked by others as well. But solution in majority of those questions worsened the situtation in my case instaed of improving.
I have a code tha runs a parallel for loop i.e. parfor. In certain cases I get the following error
java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.Arrays.copyOfRange(Unknown Source) at java.lang.StringBuffer.toString(Unknown Source)
Most of the solution suggested to increase the heap space memory in MATLAB. Once I increased the memory to 2GB from 784MB the frequency at which I was getting this error increased. One thing to note here is that the parallel for loop worked perfectly fine in version 2017b and I started getting this error when I switched to version 2020a. After looking the heap space memory allocated in 2017b I reduced the default memory in 2020a to 384MB similar to default set in 2017b. This solved the issue but I do not understand why reducing helps when most of the solutions suggest to increase the heap space memory.
I want to know a logical reasoning for this behaviour.

Réponses (0)

Catégories

En savoir plus sur Platform and License dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by