Guided path: Memory deep dive

Step 4 of 6

Continue to Pool & heap
intermediate

Working set & trimming

Which pages stay resident for a process and how Windows reclaims memory under pressure.

Related labs

Hands-on exercises for this area — in the browser or on a Windows machine.

View all labs

Official Microsoft docs

Closest official references related to this topic on Microsoft Learn.

Why it matters

Working set policy explains why processes get slower under memory pressure even before hard paging dominates.

Mental model

Each process has a working set of resident pages. Under pressure, Windows trims working sets to free frames for others.

How it works

  1. 1Frequently used pages tend to stay in the process working set.
  2. 2Memory pressure triggers working set trimming and broader reclaim.
  3. 3Superfetch and cache manager interact with which file pages stay hot in RAM.

Key terms

Working set
Pages currently resident for a process.
Trim
Removing pages from a working set to free physical memory.

A game stuttering when many apps are open

Other processes' working sets and the file cache can consume RAM, forcing trims and faults in your foreground app.

Common misconception

Task Manager 'Memory' for a process is not the full story; commit, working set, and private bytes measure different things.

You should read next

Ranked from your current topic, related links, branch depth, and any active guided path.

Related topics