Glossary
Buffer cache (unified buffer cache)
The shared store of file-backed pages in kernel memory. read(2) and mmap(2) hit the same cache; pages are kept until evicted under pressure.
The unified buffer cache is XNU's pool of in-memory file pages. Every file you read(2) is cached here; every file you mmap maps the same pages. The two paths are unified — there is no separate "read cache" and "mmap cache".
The cache is implemented as vm_objects backed by vnodes — one vm_object per vnode-pager — with pages held in the standard VM page queues (active, inactive, etc.).
When memory gets tight, the pageout daemon can evict clean file-backed pages by simply unmapping them — the original is still on disk. Dirty pages get written back, then evicted. See memory pressure on macOS.
This unification is the reason read(2) followed by mmap(2) of the same file doesn't double memory cost: both consult the same pages. It's also why memory used by the cache shows as available in Activity Monitor — it's reclaimable.
See also: mmap, vm_map, and the BSD personality article for the VFS layer that backs the cache.