A page fault does not automatically mean a program bug. It is an exception raised when a referenced virtual page needs operating-system handling; a valid page may be brought into memory. Too many faults and replacements can contribute to thrashing, where paging work crowds out useful execution. Keep program regions such as stack and heap separate from paging's address-management units.
Core words
The diagram connects different concepts without treating them as synonyms: stack and heap describe typical allocation regions, while page faults arise during virtual-memory access.
| English term | Meaning and use |
|---|---|
memory leak | Memory remains allocated or reachable after an application no longer needs it, potentially raising usage or exhausting capacity. |
Garbage collection | Automatic reclamation of objects a runtime determines are no longer reachable; it does not prevent every form of retained-memory leak. |
heap | A region commonly used for dynamically allocated data whose lifetime need not match a function call. |
stack memory | Memory commonly used for call frames, including return information and some local values; exact layout depends on language and compiler. |
Boundary register | A historical hardware protection register used with address bounds to limit a process's accessible memory range. |
overlay | A historical technique that loads only the required portion of a program into limited main memory at a time. |
Paging | Virtual-memory management using fixed-size pages and physical frames for address translation and replacement. |
Segmentation | Dividing an address space into logical regions or segments, often of varying sizes, rather than equal-sized pages. |
Words to distinguish together
| English term | Meaning and use |
|---|---|
OPT (Optimal Page Replacement) | A theoretical policy that evicts the page used furthest in the future; it is a comparison baseline because future accesses are unknown. |
Page fault | A processor exception for a virtual-memory access needing OS handling. A valid nonresident page can be loaded; an invalid access becomes an error. |
LRU | Least Recently Used: evict the item not used for the longest time; recency, not frequency, is the criterion. |
LFU | Least Frequently Used: evict the least-used item by count; frequency, not the last-use time, is the criterion. |
reference bit | A page-table or hardware-maintained indicator that a page has been accessed, useful to replacement approximations. |
modified bit/dirty bit | An indicator that a resident page has changed; a clean page usually needs no write-back of its contents on eviction. |
Locality | The tendency for accesses to cluster in time or nearby addresses rather than spread uniformly across all memory. |
Temporal locality | Recently accessed data or instructions are likely to be accessed again soon. |
Words encountered in memory analysis
| English term | Meaning and use |
|---|---|
Spatial locality | Access to one address makes nearby addresses more likely to be accessed soon. |
Working set | The pages a process actively references during a chosen time window; its size helps reason about memory pressure. |
Prepaging | Bringing pages into memory before a fault requests them, based on an expectation of future use. |
Thrashing | Excessive page faults and replacement consume so much time that useful work slows sharply. |
Base register | A historical address-translation or relocation register holding a base address to which offsets are added. |
Page table | A structure mapping virtual pages to physical frames or recording other page state needed for address translation. |
A passage from a performance report
A page fault is not always a crash: a valid page may simply need to be loaded. Frequent faults and replacement, however, can indicate severe memory pressure.
When diagnosing a slowdown, separate the question “where does this program allocate data?” from “which virtual pages are resident?” An LRU discussion is about replacement policy; a memory leak discussion is about retained allocations. Either can affect memory use, but they are different causes.
Key takeaways
Follow the sequence allocation region → virtual page → fault handling → replacement → performance. Stack and heap are allocation concepts; Paging and the Page table govern virtual addresses. LFU counts uses, LRU tracks recency, and thrashing describes the cost when page movement overwhelms useful work.

