memory footprint of system objects
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mattias Arlbrant
am 13 Dez. 2024
Kommentiert: Mattias Arlbrant
am 16 Dez. 2024
Hi
I am creating audio processors using matlab and code generation. I would like to estimate the memory usage of my audio processor objects before running code generation. To do this I loop over all members and use whos. This works fine for arrays, scalar values etc. But some members are system objects and I am not sure how to get the size of them. For example, whos gives 8 bytes for a dsp.VariableIntegerDelay('MaximumDelay',256); Is this because the size is not known yet, since the number of channels have not been provided?
0 Kommentare
Akzeptierte Antwort
jibrahim
am 13 Dez. 2024
Hi Mattias,
When you execute 'whos' on a system Object variable, the size you see is just the size of the variable pointing to the handle object. The size for this object will always be 8 bytes regadless of how many channels you use. the internal memory used by the object will not be reflected in the answer of 'whos'.
There is generally no good way to accurately estimate internal memory usage of system objects. The ref pages of the system objects will usually have descriptions of the algorithm where state size will be mentioned.
The "memory" function may be used for a rough estimate of how much memory your simulation is consuming. for example, you can execute "memory" before and after you execute your simulation, but again, this is just a rough estimate.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spectral Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!