---
name: "vm_fault_prefault"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vm_fault_prefault"
---

# vm\_fault\_prefault(9)

cluster page faults into a process's address space

## NAME

**vm\_fault\_prefault** – cluster page faults into a process's address space

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<vm/vm.h\>**

**#include \<vm/pmap.h\>**

*void*\

**vm\_fault\_prefault**(*pmap\_t pmap*, *vm\_offset\_t addra*, *vm\_map\_entry\_t entry*);

## DESCRIPTION

The **vm\_fault\_prefault**() function provides a means of clustering pagefaults into a process's address space. It operates upon the physical map *pmap*. The *entry* argument specifies the entry to be prefaulted; the *addra* argument specifies the beginning of the mapping in the process's virtual address space.

It is typically called by **vm\_fault**() after the first page fault. It benefits the [execve(2)](/execve/2.md) system call by eliminating repetitive calls to **vm\_fault**(), which would otherwise be made to bring the process's executable pages into physical memory.

## IMPLEMENTATION NOTES

This is a machine-independent function which calls the machine-dependent [pmap\_is\_prefaultable(9)](/pmap_is_prefaultable/9.md) helper function to determine if a page may be prefaulted into physical memory.

## SEE ALSO

[execve(2)](/execve/2.md), [pmap\_is\_prefaultable(9)](/pmap_is_prefaultable/9.md)

## AUTHORS

This manual page was written by Bruce M Simpson ⟨*bms@spc.org*⟩.
