The Runtime Theory
medium · 4h · 9 steps

C++ Intermediate

Automatic memory management with RAII, smart pointers, the STL containers and algorithms, and how function calls use the stack.

Curriculum (9 steps)

1

A pointer is a variable that stores a memory address. Learn how pointers work, pointer arithmetic, and null pointers.

Start→
2

Understand the difference between stack memory (fast, automatic) and heap memory (dynamic allocation), and when to use each.

Start→
3

Visual map of C++ memory segments: text (code), data (globals), heap (dynamic), and stack (locals).

Start→
4

How Resource Acquisition Is Initialization prevents memory leaks, and how unique_ptr, shared_ptr, and weak_ptr manage ownership.

Start→
5

std::vector, std::map, std::unordered_map, std::set, iterators, and the algorithm functions that operate on them.

Start→
6

Follow the call stack as main calls a function, a local variable is created, and the stack frame is pushed and popped.

Start→
7

A function call transfers control while preserving enough state for the caller to resume.

Start→
8

Follow the key state changes and boundary checks involved in what a function call places in a stack frame.

Start→
9

An interactive concept flow for what a function call places in a stack frame, from its assumptions through the main operation and boundary checks.

Start→