Handling memory is one of the most important tasks for an embedded system programmer, and surely the most delicate to take into account in every phase of the development of the system. This chapter is about the models commonly used to manage the memory in an embedded system, the geometry and the mapping of the memory, and how to prevent issues that could compromise the stability and the safety of the software running on the target. The chapter is divided into four parts:
- Memory mapping
- The execution stack
- Heap management
- The memory protection unit