How to check memory of code generated by MATLAB Coder?

조회 수: 1 (최근 30일)
Malhar Ashtaputre
Malhar Ashtaputre 2018년 2월 13일
답변: Denis Gurchenkov 2018년 2월 21일
I have written a function in matlab and then i have used MATLAB Coder to generate Generic C-Code for 16-bit microcontroller. Now, i want to check memory usage of that code. Is it possible to check it in MATLAB?

답변 (1개)

Denis Gurchenkov
Denis Gurchenkov 2018년 2월 21일
If you have Embedded Coder product, then you can use Static Code Metrics tab in the compilation report - you should be able to see stack size for each function in there.
To check the actual run-time memory usage (heap memory usage), I think there is no intrinsic way of doing that in MATLAB Coder itself. You can use some third-party tool that works with the generated C++ coder, such as valgrind massif, or VTune, or something like that.

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by