Guided path: Memory deep dive

Step 3 of 6

Continue to Working set & trimming
intermediate

Paging & page faults

How Windows brings pages in from disk and when the page file is used.

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

Stutters, swap storms, and 'out of memory' behavior are often paging decisions, not just total RAM size.

Mental model

A valid virtual address does not mean the page is in RAM right now. A page fault is Windows fetching or creating the backing page.

Go one level deeper

Extra detail for readers who want more precision before opening a child topic.

  • Transition PTEs describe pages being read from disk or zeroed on first touch.
  • Hard faults show up in Performance Monitor as 'Pages/sec' with disk correlation.

How it works

  1. 1A reference to a non-resident valid page triggers a page fault.
  2. 2The Memory Manager locates the backing store (file mapping, heap, image, or page file).
  3. 3Modified pages may be written to the page file before their physical frame is reused.

Key terms

Page fault
A trap taken when a referenced page is not resident.
Page file
Disk space used to hold evicted private pages.
Soft fault
Fault resolved without disk I/O (e.g. demand-zero or already in memory elsewhere).

First touch after allocation

Many allocations commit virtual address space first; the first write can fault in a zeroed physical page on demand.

Common misconception

High page fault rate does not always mean disk thrashing. Many faults are cheap soft faults.

You should read next

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

Related topics