---
name: "vm_map_submap"
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_map_submap"
---

# vm\_map\_submap(9)

create a subordinate map

## NAME

**vm\_map\_submap** – create a subordinate map

## SYNOPSIS

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

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

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

*int*\

**vm\_map\_submap**(*vm\_map\_t map*, *vm\_offset\_t start*, *vm\_offset\_t end*, *vm\_map\_t submap*);

## DESCRIPTION

The **vm\_map\_submap**() function marks the range bounded by *start* and *end* within the map *map* as being handled by a subordinate map *sub\_map*.

It is generally called by the kernel memory allocator.

## IMPLEMENTATION NOTES

This function is for internal use only.

Both maps must exist. The range must have been created with [vm\_map\_find(9)](/vm_map_find/9.md) previously.

No other operations may have been performed on this range before calling this function. Only the **vm\_fault**() operation may be performed within this range after calling this function.

To remove a submapping, one must first remove the range from the parent *map*, and then destroy the *sub\_map*. This procedure is not recommended.

## RETURN VALUES

The **vm\_map\_submap**() function returns KERN\_SUCCESS if successful.

Otherwise, it returns KERN\_INVALID\_ARGUMENT if the caller requested copy-on-write flags, or if the range specified for the sub-map was out of range for the parent map, or if a NULL backing object was specified.

## SEE ALSO

[vm\_map(9)](/vm_map/9.md), [vm\_map\_find(9)](/vm_map_find/9.md)

## AUTHORS

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