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

# vm\_map\_check\_protection(9)

check memory protection for a vm\_map

## NAME

**vm\_map\_check\_protection** – check memory protection for a vm\_map

## SYNOPSIS

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

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

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

*boolean\_t*\

**vm\_map\_check\_protection**(*vm\_map\_t map*, *vm\_offset\_t start*, *vm\_offset\_t end*, *vm\_prot\_t protection*);

## DESCRIPTION

The **vm\_map\_check\_protection**() function asserts that the target *map* allows the specified privilege *protection* over the entire address range from *start* to *end*. The region MUST be contiguous; no holes are allowed.

## IMPLEMENTATION NOTES

This code does not and SHOULD not check whether the contents of the region are accessible. For example, a small file may be mapped into an address space which is significantly larger in size.

## RETURN VALUES

The **vm\_map\_check\_protection**() function returns TRUE if the privilege is allowed; if it is not allowed, or if any other error occurred, the value FALSE is returned.

## SEE ALSO

[munmap(2)](/munmap/2.md), [vm\_map(9)](/vm_map/9.md), [vm\_map\_protect(9)](/vm_map_protect/9.md)

## AUTHORS

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