Java Heap Space Memory Issue
4 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!