blob: b4de93447e1f0ff4af8abb2bdd960720f8cdb17b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
<table class="head">
<tr>
<td class="head-ltitle">VM_MAP_INSERT(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">VM_MAP_INSERT(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">vm_map_insert</code> —
<span class="Nd">insert an object into a map</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">sys/param.h</a>></code>
<br/>
<code class="In">#include <<a class="In">vm/vm.h</a>></code>
<br/>
<code class="In">#include <<a class="In">vm/vm_map.h</a>></code></p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">vm_map_insert</code>(<var class="Fa">vm_map_t map</var>,
<var class="Fa">vm_object_t object</var>, <var class="Fa">vm_ooffset_t
offset</var>, <var class="Fa">vm_offset_t start</var>,
<var class="Fa">vm_offset_t end</var>, <var class="Fa">vm_prot_t prot</var>,
<var class="Fa">vm_prot_t max</var>, <var class="Fa">int cow</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The
<a class="permalink" href="#vm_map_insert"><code class="Fn" id="vm_map_insert">vm_map_insert</code></a>()
function inserts a mapping for the entire vm_object
<var class="Fa">object</var> into the target map
<var class="Fa">map</var>.</p>
<p class="Pp">The <var class="Fa">offset</var> argument specifies the offset
into the <var class="Fa">object</var> at which to begin mapping. The
object's size should match that of the specified address range.</p>
<p class="Pp">The <var class="Fa">start</var> and <var class="Fa">end</var>
arguments specify the bounds of the mapped object's window in the address
space of <var class="Fa">map</var>.</p>
<p class="Pp">The <var class="Fa">cow</var> argument specifies the flags which
should be propagated to the new entry, for example, to indicate that this is
a copy-on-write mapping.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="IMPLEMENTATION_NOTES"><a class="permalink" href="#IMPLEMENTATION_NOTES">IMPLEMENTATION
NOTES</a></h1>
<p class="Pp">This function implicitly creates a new
<var class="Vt">vm_map_entry</var> by calling the internal function
<code class="Fn">vm_map_entry_create</code>().</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<p class="Pp">The <code class="Fn">vm_map_insert</code>() function returns
<code class="Dv">KERN_SUCCESS</code> if the mapping could be made
successfully.</p>
<p class="Pp">Otherwise, <code class="Dv">KERN_INVALID_ADDRESS</code> will be
returned if the start of the range could not be found, or
<code class="Dv">KERN_NO_SPACE</code> if the range was found to be part of
an existing entry or if it overlaps the end of the map.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">vm_map(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Bruce M
Simpson</span>
<<a class="Mt" href="mailto:bms@spc.org">bms@spc.org</a>>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">January 11, 2013</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|