2 .\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd manage page wiring within a virtual memory map
40 .Fn vm_map_wire "vm_map_t map" "vm_offset_t start" "vm_offset_t end" "int flags"
43 .Fa "vm_map_t map" "vm_offset_t start" "vm_offset_t end" "int flags"
48 function is responsible for wiring pages in the range between
54 Wired pages are locked into physical memory, and may not be paged out
55 as long as their wire count remains above zero.
59 function performs the corresponding unwire operation.
63 argument is a bit mask, consisting of the following flags:
67 flag is set, the function operates within user address space.
70 .Dv VM_MAP_WIRE_HOLESOK
71 flag is set, it may operate upon an arbitrary range within the
75 If a contiguous range is desired, callers should explicitly express
76 their intent by specifying the
77 .Dv VM_MAP_WIRE_NOHOLES
79 .Sh IMPLEMENTATION NOTES
80 Both functions will attempt to acquire a lock on the map using
82 and hold it for the duration of the call.
84 .Dv MAP_ENTRY_IN_TRANSITION ,
86 .Xr vm_map_unlock_and_wait 9
87 until the map becomes available again.
89 The map could have changed during this window as it was held by another
90 consumer, therefore consumers of this interface should check for this
91 condition using the return values below.
97 functions have identical return values.
100 if all pages within the range were [un]wired successfully.
102 Otherwise, if the specified range was not valid,
103 or if the map changed while the
104 .Dv MAP_ENTRY_IN_TRANSITION
106 .Dv KERN_INVALID_ADDRESS
113 This manual page was written by
114 .An Bruce M Simpson Aq bms@spc.org .