vm_map_inherit(9freebsd)

vm_map_inherit9freebsd

Set fork inheritance flags for a range within a map

Usage

#include <sys/param.h>

#include <vm/vm.h>

#include <vm/vm_map.h>

int

vm_map_inherit(vm_map_t map, vm_offset_t start, vm_offset_t end, vm_inherit_t new_inheritance);

Overview

The vm_map_inherit() function sets the inheritance flags for the range start to end within the target map to the value new_inheritance.

The new_inheritance flag must have one of the values VM_INHERIT_NONE, VM_INHERIT_COPY, or VM_INHERIT_SHARE. This affects how the map will be shared with child maps when the associated process forks.

Implementation notes

The vm_map_inherit() function obtains a lock on the map using vm_map_lock(9) for the duration of the function.

Return values

The vm_map_inherit() function returns KERN_SUCCESS if the inheritance flags could be set. Otherwise, if the provided flags were invalid, KERN_INVALID_ARGUMENT will be returned.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Bruce M Simpson ⟨[email protected]⟩.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.