IT lexicon › Hardware › MemManage

MemManage

Hardware På svenska → Updated: 2026-11-04

The Cortex-M exception for accesses the memory protection forbids. Without it, an MPU would just be decoration.

Exception number 4. It's taken when a load, store or instruction fetch violates an MPU region, or when the core tries to execute from an area marked execute-never. The peripheral and system regions are already execute-never in the default memory map, MPU or not. The MMFSR status bits distinguish instruction from data accesses (IACCVIOL, DACCVIOL) and flag faults during stacking. For data accesses, the offending address lands in MMFAR.

The everyday use is stack protection. An RTOS places a small guard region at the bottom of each task's stack, so an overflow becomes a MemManage fault on the exact instruction that went over the edge. Without the guard, you get silently corrupted data that crashes something unrelated an hour later.

← Back to the lexicon