memory footprint of system objects

조회 수: 8 (최근 30일)
Mattias Arlbrant
Mattias Arlbrant 2024년 12월 13일
댓글: Mattias Arlbrant 2024년 12월 16일
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?

채택된 답변

jibrahim
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.
  댓글 수: 1
Mattias Arlbrant
Mattias Arlbrant 2024년 12월 16일
Hi, Thanks for the explanation!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Analysis에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by