Summary

Memory management in an embedded system is the source of the most critical bugs, and for this reason particular attention must be dedicated to designing and implementing the correct solutions for the platform in use, and application purposes. The execution stack should be carefully placed, sized, and delimited when possible.

Systems not providing dynamic allocations are safer, but most embedded systems benefit from dynamic allocation techniques. Programmers must be aware that errors in memory handling can be critical for the system, and very difficult to spot, so extra care is required when the code handles dynamically allocated pointers.

The MPU can be a valid tool to enforce access permissions and attributes on memory regions, and ...

Get Embedded Systems Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.