matlab2020a increasingly taking more memory as program running

조회 수: 1 (최근 30일)
Y. Li
Y. Li 2020년 5월 24일
댓글: Y. Li 2020년 5월 28일
I have posted a question regarding this but get no answer. The question is here:https://www.mathworks.com/matlabcentral/answers/531558-matlab-2020a-crash-due-to-out-of-memory
The problem can be reproduced with fellowing simple code only in release 2020a (well, only 2020a has this problem):
===================================================
clear
while 1
a = rand(100,100);
b = a.^2;
c = fft(a(:,1));
end
=============================================================
when running this code, despite no more variable is created, Matlab will take ~200kb more memory every second, and eventually dry out all memoery I have in few hours(days). It will need all those three lines in the loop to reproduce this problem somehow. 2019a does not have this problem.
Any insight regarding this?

답변 (1개)

Rajani Mishra
Rajani Mishra 2020년 5월 26일
Question will be more clear if code is also provided. I tried code with above mentioned 3 lines in a loop running for 10000 times and it works fine. Possibly the infinite loop in the line " while 1 " is causing the problem.
  댓글 수: 1
Y. Li
Y. Li 2020년 5월 28일
I think you probably misinterpret the question here.
As I stated in the question, this code will slowly consume more memory as it runs. Specificlly, about 200kb more every second on my machine. If you let the code above run as it is without change anything, you should be able to see it consuming more memory over time clearly from task manager.
This behavior will cause problem for programs need to run for days.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by