memory footprint of system objects
조회 수: 8 (최근 30일)
이전 댓글 표시
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
채택된 답변
jibrahim
2024년 12월 13일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!