MODULE 01 · BEGINNER

Compilation Pipeline, Translation Units & Process MemoryC++ Systems Programming · Module 1

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.

4 lessons16 min readingCompilation Model, Memory Layout & RAII Foundations
Free, self-paced, and open to everyone. No account needed.
WHAT THIS MODULE COVERS

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.

BEFORE YOU START

Basic command of procedural programming concepts

WHAT YOU’LL BE ABLE TO DO

Deep understanding of the preprocessor, translation units, linker symbol resolution, and process virtual memory layout.

THE LESSON SEQUENCE

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.

  1. 01.01
    The Four Stages of Compilation: Preprocessor to Machine Code

    Trace how C++ source code transforms through preprocessing, compilation to assembly, assembly to object files, and final linking into an ELF/PE executable binary.

    4 min
  2. 01.02
    Translation Units, Storage Duration, and Linker Symbol Resolution

    Master the mechanics of internal vs external linkage, the One Definition Rule (ODR), symbol mangling, and debugging unresolved externals and duplicate symbols.

    4 min
  3. 01.03
    Virtual Memory, Page Tables, and Process Address Space Architecture

    Explore operating system virtual memory architecture: Memory Management Units (MMU), 4KB page translations, Page Faults, and segment layouts (Text, Data, BSS, Heap, Stack).

    4 min
  4. 01.04
    Stack vs Heap Allocation: Mechanics, Cache Locality, and Latency

    Compare the mechanics, performance, and hardware implications of stack-frame allocation versus dynamic heap allocators (malloc/brk/mmap).

    4 min
MODULE SELF-CHECK

Ready to move on?

Inspect preprocessed translation units with g++ -E and demangle binary symbols with c++filt.

Open the module self-check