---
name: "vm_page_wire"
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_page_unwire"
---

# vm\_page\_wire(9)

wire and unwire pages

Part of [vm\_page\_unwire(9)](/vm_page_unwire/9.md).

## NAME

**vm\_page\_wire**, **vm\_page\_unwire**, **vm\_page\_unwire\_noq** – wire and unwire pages

## SYNOPSIS

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

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

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

*void*\

**vm\_page\_wire**(*vm\_page\_t m*);

*bool*\

**vm\_page\_wire\_mapped**(*vm\_page\_t m*);

*void*\

**vm\_page\_unwire**(*vm\_page\_t m*, *int queue*);

*bool*\

**vm\_page\_unwire\_noq**(*vm\_page\_t m*);

## DESCRIPTION

The **vm\_page\_wire**() and **vm\_page\_wire\_mapped**() functions wire the page, which prevents it from being reclaimed by the page daemon or when its containing object is destroyed. Both functions require that the page belong to an object. The **vm\_page\_wire\_mapped**() function is for use by the [pmap(9)](/pmap/9.md) layer following a lookup. This function may fail if mappings of the page are concurrently being destroyed, in which case it will return false.

The **vm\_page\_unwire**() and **vm\_page\_unwire\_noq**() functions release a wiring of a page. The **vm\_page\_unwire**() function takes a queue index and will insert the page into the corresponding page queue upon releasing its last wiring. If the page does not belong to an object and no other references to the page exist, **vm\_page\_unwire**() will free the page. **vm\_page\_unwire\_noq**() releases the wiring and returns true if it was the last wiring of the page.

## AUTHORS

This manual page was written by Chad David ⟨*davidc@acns.ab.ca*⟩.
