Search code examples
memory-managementmemory-leaksembeddedstack-overflow

Memory bug detector for embedded systems?


What are the most useful tools for finding memory management errors in embedded systems? Is valgrind capable of doing that? What input do they need? Source code? Object code?

Is there a difference if I am using an embedded OS or a standalone embedded application?


Solution

  • The two things we are doing to detect memory issue:

    1/ Preventive measure : use Grammatech CodeSonar. As a static analyzer, it can detect memory issue.

    2/ Embedded control to monitor stack & heap usage.

    3/ Globally, try not using dynamic memory allocation or at least restrict the new keyword usage at initialization of the firmware. You will avoid heap fragmentation and memory issue.