ABSTRACT

This chapter focuses on software-based techniques, because many embedded microcontrollers, especially low-end ones, lack any form of hardware-based memory protection. In order to tackle memory corruption, most general-purpose processors implement some form of hardware-based memory protection, by introducing the concept of virtual memory and putting it in force by means of a hardware component known as memory management unit (MMU). The main disadvantage of MMUs, which should be evident even from the terse and simplified description given in the previous section, is that the address translation process is quite complex. Having a very small number of regions to divide the overall memory address space into, implies that memory access control granularity is much broader when using a memory protection units (MPU) rather than a MMU. The primary difference between MMUs and MPUs concerns their cost and complexity of implementation in terms of silicon area, stemming from the much simpler structure of MPUs.