Matlab 2020a/b fft function memory leak

3 ビュー (過去 30 日間)
Felix
Felix 2020 年 10 月 28 日
コメント済み: Steven Lord 2022 年 7 月 13 日
The problem can be recreated using code below
The code contain a fft inside a loop, two 2*1 matrix and nothing more.
---------------------- start ----------------------
clear
a = ones(2,1);
while 1
c = fft(a);
end
-------------------- end ---------------------
when start running this code, MATLAB 2020b is taking about 1.4g memory as shown below
Then, the code would take about ~50mb more memory per second. After running the code above a few minutes,
the memory occupation is shown below
I think those figures are pretty self explanatory to the problem. Keep running code above will eventually exhaust all whatever amount of memory avaliable to the computer.
This feature effectively eliminate the possibility of using matlab for projects involve large amount of FFT.
I think this feature is undesired for my purpose. Is this feature expected or not? If expected, how can I get around of this feature and release those memory? If unexpected, when would it get fixed?
This feature is unique to MATLAB 2020a and MATLAB 2020b, previous release does not contain this unexpected feature.

回答 (1 件)

Anmol Dhiman
Anmol Dhiman 2020 年 11 月 3 日
Hi Felix,
This memory leak is in fact a bug which originated in R2020a and has no current workaround.
Only a very tiny amount of memory is leaked in each function call, however this becomes problematic when aggregated over many calls.
Our developers are aware about it and will try to fix it in future releases.
Regards,
Anmol Dhiman
  5 件のコメント
Paul
Paul 2022 年 7 月 13 日
Seems to have been fixed in a version of 2021a link to bug report
Steven Lord
Steven Lord 2022 年 7 月 13 日
I believe this is Bug Report 2367377 which is reported as fixed in release R2021a.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by