vm_page_protect(9freebsd)

vm_page_protect9freebsd

Lower a page's protection

Usage

#include <sys/param.h>

#include <vm/vm.h>

#include <vm/vm_page.h>

void

vm_page_protect(vm_page_t mem, int prot);

Overview

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.

Releases

3 releases since Debian 5.0 (Lenny); the text changed 2 times.

  1. 5.0
  2. 6.0
  3. 7

Authors

This manual page was written by Chad David ⟨[email protected]⟩.

From freebsd-manpages 8.2-1 in Debian 7 (Wheezy). Parsed by carta from the page's mdoc source.