Any way to determine RAM usage at runtime?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Any way to determine RAM usage at runtime?

跳至解决方案
1,895 次查看
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,641 次查看
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,642 次查看
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,641 次查看
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 项奖励
回复