Any way to determine RAM usage at runtime?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Any way to determine RAM usage at runtime?

ソリューションへジャンプ
1,888件の閲覧回数
mike1974
Contributor III

Can the KDS debugger tell me RAM usage?  I know that looking at the .map file could be helpful, but I'm allocating some stuff dynamically at runtime, and I would like to know how much I have left after doing so.

ラベル(1)
1 解決策
1,634件の閲覧回数
BlackNight
NXP Employee
NXP Employee

That depends on how you are allocating dynamically your objects. You would need a function from that heap management to tell you the amount of free heap. If you are usinig FreeRTOS, it will report it to you with heap size with xPortFreeHeapSize().

元の投稿で解決策を見る

3 返答(返信)
1,635件の閲覧回数
BlackNight
NXP Employee
NXP Employee

That depends on how you are allocating dynamically your objects. You would need a function from that heap management to tell you the amount of free heap. If you are usinig FreeRTOS, it will report it to you with heap size with xPortFreeHeapSize().

1,634件の閲覧回数
mike1974
Contributor III

Thank you Erich.

By the way, I don't see a memory usage summary in the .map file.  It seems I will have to extract it manually by searching/looking at each sections usage.

Do you know of a better way?

0 件の賞賛
返信