What can be done to reduce memory usage in MATLAB R2015b?

Has anyone else noticed that MATLAB version R2015b seems to use a lot more memory than R2015a (64 bit)? In my experiments, it seems to be using at least twice as much memory. So, for example, a program that used to use around 2.1 GB of memory is now using at least 4.6 GB. I've heard that the new MATLAB has a new execution engine and I wonder if that is part of the problem and what can be done about it. I'm also using the Image Processing Toolbox, so I suppose the problem could be in there. Any help is appreciated.

3 件のコメント

drphilosopher
drphilosopher 2015 年 10 月 28 日
Commenting on my own question: I should also point out that when I use Ctrl-C to stop the script, memory is not freed and when I try to exit MATLAB it spends a lot of time -- several minutes -- cleaning up memory before it finally exits (if it exits at all).
Walter Roberson
Walter Roberson 2015 年 10 月 29 日
Are you creating a lot of graphics? If so what kind of graphics are you creating, and what steps are you taking to ensure they are deleted when finished with?
drphilosopher
drphilosopher 2015 年 10 月 29 日
Hi, Actually, I'm not creating any graphics. The image processing functions are used on input images that are processed for certain kinds of features. The collected data is then output to a file, a support vector machine (exe) is called and the final results are written to another file.

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

回答 (1 件)

Philip Borghesani
Philip Borghesani 2015 年 10 月 29 日

0 投票

Do you use/run code that is really data? For instance does some function generate MATLAB code files dynamically that are later run? If so then I suggest clearing the functions or scripts after running them with the clear command. Use clear myfunctionname not clear all for this.

1 件のコメント

drphilosopher
drphilosopher 2015 年 10 月 29 日
No, I'm not generating MATLAB code files. The amount of MATLAB code is static.

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

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

製品

質問済み:

2015 年 10 月 28 日

コメント済み:

2015 年 10 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by