How much memory is used by all functions and subfunctions in my program?
Afficher commentaires plus anciens
Hi,
I want to know how much memory my program uses during execution. I know that the function whos can be used to list all variables in every workspace. I have tested saving the bytes used by calling whos in every function and saving the size of every variable into a global variable. I thought that, at the end, I would be able to see how much memory my program has used by looking at the global variable. However, I'm encountering a problem. The global variable keeps increasing even after the program has finished, and it seems to never stop.
I'm therefore wondering if there is an easier way to see how much memory the whole program has used?
Réponses (1)
per isakson
le 8 Mar 2013
Modifié(e) : per isakson
le 8 Mar 2013
0 votes
Search "Strategies for Efficient Use of Memory" in the on-line help
4 commentaires
abebe
le 8 Mar 2013
per isakson
le 8 Mar 2013
"The global variable keeps increasing even after the program has finished" sounds weird to me. I cannot help. You provide to little information.
What OS are you using? If Windows you might find http://technet.microsoft.com/en-us/sysinternals useful.
abebe
le 12 Mar 2013
Walter Roberson
le 12 Mar 2013
On MS Windows you can use the MATLAB commands
memory
feature('memstats')
Note: these are not available on the other operating systems.
Catégories
En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!