---
name: "vm_page_protect"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/vm_page_protect"
---

# vm\_page\_protect(9)

lower a page's protection

## NAME

**vm\_page\_protect** – lower a page's protection

## SYNOPSIS

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

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

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

*void*\

**vm\_page\_protect**(*vm\_page\_t mem*, *int prot*);

## DESCRIPTION

The **vm\_page\_protect**() function lowers a page's protection. The protection is never raised by this function; therefore, if the page is already at VM\_PROT\_NONE, the function does nothing.

Its arguments are:

- *mem*

  The page whose protection is lowered.

- *prot*

  The protection the page should be reduced to. If VM\_PROT\_NONE is specified, then the PG\_WRITABLE and PG\_MAPPED flags are cleared and the pmap\_page's protection is set to VM\_PROT\_NONE. If VM\_PROT\_READ is specified, then the PG\_WRITABLE flag is cleared and the pmap\_page's protection is set to VM\_PROT\_READ.

Higher protection requests are ignored.

## AUTHORS

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