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.

Compiler: Request ability to confirm at link-time that no heap is being used

Expert 1226 points

Tool/software: TI C/C++ Compiler

I would like to be able to easily confirm at link-time that our firmware makes no use of the heap.

Hypothetically I could search the .map file for any presence of malloc(), or the .sysmem section.  I don't actually know if this would work reliably; perhaps there are cases where our firmware would not be making any calls which would call malloc(), but in which malloc() might end up getting compiled into the firmware anyway?


The Keil ARM compiler has a feature you can use which will prevent the firmware from linking if there are any calls that directly or indirectly use the heap.  This is a useful feature that I would like to have comparable support for in the TI ARM compiler.

--thx