Glossary
vm_map
The machine-independent description of a task's virtual address space. A sorted list of entries, each pointing at a vm_object.
A vm_map is the per-task list of mapped regions and what they're backed by. Each vm_map_entry covers a contiguous virtual range and points at a vm_object that knows where the actual pages live — in RAM, in the compressor, paged out, or in a file (mmap).
apple-oss-distributions/xnuosfmk/vm/vm_map.hvm_map_t — the per-task list of mapped regions.View on GitHub(line —) apple-oss-distributions/xnuosfmk/vm/vm_object.hvm_object — the source-of-truth for what backs a mapping.View on GitHub(line —)
When you call mmap, vm_allocate, or even just allocate a thread stack, the kernel adds a new vm_map_entry to your task's map. Pages don't materialize until you touch them — the first read or write triggers a page fault, the fault handler asks the vm_object where the page lives, and only then does a physical frame get allocated and the pmap updated.
See also: pmap, virtual memory, VM compressor.