1 .\"
2 .\" Mach Operating System
3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
4 .\" All Rights Reserved.
5 .\"
6 .\" Permission to use, copy, modify and distribute this software and its
7 .\" documentation is hereby granted, provided that both the copyright
8 .\" notice and this permission notice appear in all copies of the
9 .\" software, derivative works or modified versions, and any portions
10 .\" thereof, and that both notices appear in supporting documentation.
11 .\"
12 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 .\"
16 .\" Carnegie Mellon requests users of this software to return to
17 .\"
18 .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 .\" School of Computer Science
20 .\" Carnegie Mellon University
21 .\" Pittsburgh PA 15213-3890
22 .\"
23 .\" any improvements or extensions that they make and grant Carnegie Mellon
24 .\" the rights to redistribute these changes.
25 .\"
26 .\"
27 .\" HISTORY
28 .\" $Log: vm_inherit.man,v $
29 .\" Revision 2.5 93/03/18 15:16:44 mrt
30 .\" corrected types
31 .\" [93/03/12 16:55:19 lli]
32 .\"
33 .\" Revision 2.4 91/05/14 17:15:36 mrt
34 .\" Correcting copyright
35 .\"
36 .\" Revision 2.3 91/02/14 14:16:14 mrt
37 .\" Changed to new Mach copyright
38 .\" [91/02/12 18:17:10 mrt]
39 .\"
40 .\" Revision 2.2 90/08/07 18:47:30 rpd
41 .\" Created.
42 .\"
43 .TH vm_inherit 2 9/19/86
44 .CM 4
45 .SH NAME
46 .nf
47 vm_inherit \- specifies inheritence of address space
48 .SH SYNOPSIS
49 .nf
50 .ft B
51 #include <mach.h>
52
53 .nf
54 .ft B
55 kern_return_t vm_inherit(target_task, address, size, new_inheritance)
56 mach_port_t target_task;
57 vm_address_t address;
58 vm_size_t size;
59 vm_inherit_t new_inheritance;
60
61
62 .fi
63 .ft P
64 .SH ARGUMENTS
65 .TP 15
66 .B
67 target_task
68 Task whose virtual memory is to be affected.
69 .TP 15
70 .B
71 address
72 Starting address (will be rounded down to a page
73 boundary).
74 .TP 15
75 .B
76 size
77 Size in bytes of the region for which inheritance is to change
78 (will be rounded up to give a page boundary).
79 .TP 15
80 .B
81 new_inheritance
82 How this memory is to be inherited in child tasks.
83 Inheritance is specified by using one of these following three values:
84 .TP 15
85 .B
86 VM_INHERIT_SHARE
87 Child tasks will share this memory with this task.
88 .TP 15
89 .B
90 VM_INHERIT_COPY
91 Child tasks will receive a copy of this region.
92 .TP 15
93 .B
94 VM_INHERIT_NONE
95 This region will be absent from child tasks.
96
97 .SH DESCRIPTION
98 .B vm_inherit
99 specifies how a region of a task's address space
100 is to be passed to child tasks at the time of task creation.
101 Inheritance is an attribute of virtual pages, thus the addresses
102 and size of memory to be set will be rounded out to refer to
103 whole pages.
104
105 Setting
106 .B vm_inherit
107 to
108 .B VM_INHERIT_SHARE
109 and forking a child
110 task is the only way two Mach
111 .B tasks
112 can share physical memory.
113 Remember that all the
114 .B theads
115 of a given task share all the same
116 memory.
117
118 .SH DIAGNOSTICS
119 .TP 25
120 KERN_SUCCESS
121 Memory protected.
122 .TP 25
123 KERN_INVALID_ADDRESS
124 Illegal address specified.
125
126 .SH SEE ALSO
127 .B task_create, vm_regions
128
Cache object: ad846e3994025429ecd6e95ec45966c6
|