How much memory is used by all functions and subfunctions in my program?
Mostrar comentarios más antiguos
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?
Respuestas (1)
per isakson
el 8 de Mzo. de 2013
Editada: per isakson
el 8 de Mzo. de 2013
0 votos
Search "Strategies for Efficient Use of Memory" in the on-line help
4 comentarios
abebe
el 8 de Mzo. de 2013
per isakson
el 8 de Mzo. de 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
el 12 de Mzo. de 2013
Walter Roberson
el 12 de Mzo. de 2013
On MS Windows you can use the MATLAB commands
memory
feature('memstats')
Note: these are not available on the other operating systems.
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!