Compilation Pipeline, Translation Units & Process Memory
Dissect the four phases of the C++ compilation model, header inclusion semantics, linker symbol resolution, and the virtual memory address space of modern OS processes.
Basic command of procedural programming concepts
Deep understanding of the preprocessor, translation units, linker symbol resolution, and process virtual memory layout.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 01.01The Four Stages of Compilation: Preprocessor to Machine Code4 min
Trace how C++ source code transforms through preprocessing, compilation to assembly, assembly to object files, and final linking into an ELF/PE executable binary.
- 01.02Translation Units, Storage Duration, and Linker Symbol Resolution4 min
Master the mechanics of internal vs external linkage, the One Definition Rule (ODR), symbol mangling, and debugging unresolved externals and duplicate symbols.
- 01.03Virtual Memory, Page Tables, and Process Address Space Architecture4 min
Explore operating system virtual memory architecture: Memory Management Units (MMU), 4KB page translations, Page Faults, and segment layouts (Text, Data, BSS, Heap, Stack).
- 01.04Stack vs Heap Allocation: Mechanics, Cache Locality, and Latency4 min
Compare the mechanics, performance, and hardware implications of stack-frame allocation versus dynamic heap allocators (malloc/brk/mmap).
Ready to move on?
Inspect preprocessed translation units with g++ -E and demangle binary symbols with c++filt.
Open the module self-check