MMU

2 Posts

How MMU, MPU, Page Tables, and Address Spaces Differ Across MCU, RTOS, and Linux Systems

9 minute

In embedded systems, the word “address” often sounds as if everyone means the same thing.

In bare-metal code, a pointer may be close to a real SRAM address. RTOS tasks may share one address space. An MCU with an MPU can catch some out-of-bounds accesses, but usually does not provide full address translation. A Linux user process sees virtual addresses, while a DMA device may see a different bus address.

Read More

Why Virtual Memory Hides Real Memory From Programs

8 minute

When a program prints a pointer, it looks like it has obtained “a memory address.” Many wrong assumptions start there.

On systems such as Linux, the address seen by a user program is usually not a physical memory address. It is a virtual address. The same 0x400000 in two different processes can point to completely different physical pages. A pointer from one process is not directly meaningful in another process.

Read More