Any way to determine RAM usage at runtime?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Any way to determine RAM usage at runtime?

Jump to solution
920 Views
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.

Labels (1)
1 Solution
666 Views
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().

View solution in original post

3 Replies
667 Views
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().

666 Views
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 Kudos