Is there a built in function / utility to check heap usage during runtime?
I am using the TMS570, Halcogen 4.0 and CCS5.5
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Is there a built in function / utility to check heap usage during runtime?
I am using the TMS570, Halcogen 4.0 and CCS5.5
David,
I did a quick check of the compiler manual and didn't see any sort of checking of heap usage mentioned. Of course setting the heap size for the compiler runtime lib's heap is mentioned but that's about it. You could post the question to the compiler forum to see if there's anything further that I'm not aware of.
But what I've seen in the embedded space is that usually the RTOS vendor provides alternate memory pool / heap functions that are much richer than what is supported by the compiler.
For example if you are using FreeRTOS then it has multiple different options for heap implementations. And some of them support the 'vApplicationMallocFailedHook()' callback or hook function that you could use to trap heap allocation failures. I think this is probably more in line with what you're looking for - so I'd start exploring the various RTOS options you might have and look for a fit there rather than looking at the compiler.
David,
You can refer to an app note by IAR for some suggestions:
Regards, Sunil