1 .\" $NetBSD: minherit.2,v 1.20 2014/08/05 15:01:03 riastradh Exp $
3 .\" Copyright (c) 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)minherit.2 8.1 (Berkeley) 6/9/93
37 .Nd control the inheritance of pages
43 .Fn minherit "void *addr" "size_t len" "int inherit"
47 system call changes the specified range of virtual addresses to have
48 the inheritance characteristic
52 will map the region in the child process.
53 The supported inheritance characteristics are:
54 .Bl -tag -offset abcd -width MAP_INHERIT_DEFAULT
56 The child is given a private copy of the region: writes from parent or
57 child are not seen by the other.
59 The region is unmapped in the child.
61 The child is shares the region with the parent: writes from parent and
62 child are seen by both.
64 The region is mapped in the child to anonymous pages filled with
68 Normally, the parent's virtual address space is copied for the child
70 .Dv MAP_INHERIT_COPY ,
72 .Dv MAP_INHERIT_DEFAULT
74 Regions in the parent mapped using
78 flag are by default shared with the child as if with
79 .Dv MAP_INHERIT_SHARED .
81 Not all implementations will guarantee that the inheritance characteristic
82 can be set on a page basis;
83 the granularity of changes may be as large as an entire region.
91 An invalid region or invalid parameters were specified.
104 function first appeared in
107 If a particular port does not support page-granularity
108 inheritance, there's no way to figure out how large a region is