summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/vm_map.9 4.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man9/vm_map.9 4.html')
-rw-r--r--static/freebsd/man9/vm_map.9 4.html290
1 files changed, 0 insertions, 290 deletions
diff --git a/static/freebsd/man9/vm_map.9 4.html b/static/freebsd/man9/vm_map.9 4.html
deleted file mode 100644
index c6cb9812..00000000
--- a/static/freebsd/man9/vm_map.9 4.html
+++ /dev/null
@@ -1,290 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">VM_MAP(9)</td>
- <td class="head-vol">Kernel Developer's Manual</td>
- <td class="head-rtitle">VM_MAP(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</code> &#x2014; <span class="Nd">virtual
- address space portion of virtual memory subsystem</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
- &lt;<a class="In">sys/param.h</a>&gt;</code>
- <br/>
- <code class="In">#include &lt;<a class="In">vm/vm.h</a>&gt;</code>
- <br/>
- <code class="In">#include &lt;<a class="In">vm/vm_map.h</a>&gt;</code></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<p class="Pp">The <code class="Nm">vm_map</code> subsystem is used to manage
- virtual address spaces. This section describes the main data structures used
- within the code.</p>
-<p class="Pp">The <var class="Vt">struct vm_map</var> is a generic
- representation of an address space. This address space may belong to a user
- process or the kernel. The kernel actually uses several maps, which are
- maintained as subordinate maps, created using the
- <a class="Xr">vm_map_submap(9)</a> function.</p>
-<div class="Bd Pp Bd-indent Li">
-<pre>struct vm_map {
- struct vm_map_entry header;
- union {
- struct sx lock;
- struct mtx system_mtx;
- };
- int nentries;
- vm_size_t size;
- u_int timestamp;
- u_int flags;
- vm_map_entry_t root;
- pmap_t pmap;
- int busy;
-};</pre>
-</div>
-<p class="Pp">The fields of <var class="Vt">struct vm_map</var> are as
- follows:</p>
-<dl class="Bl-tag">
- <dt id="header"><var class="Va">header</var></dt>
- <dd>Head node of a circular, doubly linked list of <var class="Vt">struct
- vm_map_entry</var> objects. Each object defines a particular region within
- this map's address space.</dd>
- <dt id="lock"><var class="Va">lock</var></dt>
- <dd>Used to serialize access to the structure.</dd>
- <dt id="system_mtx"><var class="Va">system_mtx</var></dt>
- <dd>A mutex which is used if the map is a system map.</dd>
- <dt id="nentries"><var class="Va">nentries</var></dt>
- <dd>A count of the members in use within the circular map entry list.</dd>
- <dt id="size"><var class="Va">size</var></dt>
- <dd>Specifies the size of the virtual address space.</dd>
- <dt id="timestamp"><var class="Va">timestamp</var></dt>
- <dd>Used to determine if the map has changed since its last access.</dd>
- <dt id="flags"><var class="Va">flags</var></dt>
- <dd>Map flags, described below.</dd>
- <dt id="root"><var class="Va">root</var></dt>
- <dd>Root node of a binary search tree used for fast lookup of map
- entries.</dd>
- <dt id="pmap"><var class="Va">pmap</var></dt>
- <dd>Pointer to the underlying physical map with which this virtual map is
- associated.</dd>
- <dt id="busy"><var class="Va">busy</var></dt>
- <dd>Map busy counter, prevents forks.</dd>
-</dl>
-<p class="Pp">Possible map flags:</p>
-<dl class="Bl-tag">
- <dt id="MAP_WIREFUTURE"><a class="permalink" href="#MAP_WIREFUTURE"><code class="Dv">MAP_WIREFUTURE</code></a></dt>
- <dd>Wire all future pages in this map.</dd>
- <dt id="MAP_BUSY_WAKEUP"><a class="permalink" href="#MAP_BUSY_WAKEUP"><code class="Dv">MAP_BUSY_WAKEUP</code></a></dt>
- <dd>There are waiters for the map busy status.</dd>
- <dt id="MAP_NEEDS_WAKEUP"><var class="Va">MAP_NEEDS_WAKEUP</var></dt>
- <dd>Indicates if a thread is waiting for an allocation within the map. Used
- only by system maps.</dd>
- <dt id="MAP_SYSTEM_MAP"><var class="Va">MAP_SYSTEM_MAP</var></dt>
- <dd>If set, indicates that the map is the system map; otherwise, it belongs to
- a user process.</dd>
-</dl>
-<p class="Pp">The following flags can be passed to
- <a class="Xr">vm_map_find(9)</a> and <a class="Xr">vm_map_insert(9)</a> to
- specify the copy-on-write properties of regions within the map:</p>
-<dl class="Bl-tag">
- <dt id="MAP_COPY_ON_WRITE"><a class="permalink" href="#MAP_COPY_ON_WRITE"><code class="Dv">MAP_COPY_ON_WRITE</code></a></dt>
- <dd>The mapping is copy-on-write.</dd>
- <dt id="MAP_NOFAULT"><a class="permalink" href="#MAP_NOFAULT"><code class="Dv">MAP_NOFAULT</code></a></dt>
- <dd>The mapping should not generate page faults.</dd>
- <dt id="MAP_PREFAULT"><a class="permalink" href="#MAP_PREFAULT"><code class="Dv">MAP_PREFAULT</code></a></dt>
- <dd>The mapping should be prefaulted into physical memory.</dd>
- <dt id="MAP_PREFAULT_PARTIAL"><a class="permalink" href="#MAP_PREFAULT_PARTIAL"><code class="Dv">MAP_PREFAULT_PARTIAL</code></a></dt>
- <dd>The mapping should be partially prefaulted into physical memory.</dd>
- <dt id="MAP_DISABLE_SYNCER"><a class="permalink" href="#MAP_DISABLE_SYNCER"><code class="Dv">MAP_DISABLE_SYNCER</code></a></dt>
- <dd>Do not periodically flush dirty pages; only flush them when absolutely
- necessary.</dd>
- <dt id="MAP_DISABLE_COREDUMP"><a class="permalink" href="#MAP_DISABLE_COREDUMP"><code class="Dv">MAP_DISABLE_COREDUMP</code></a></dt>
- <dd>Do not include the mapping in a core dump.</dd>
- <dt id="MAP_PREFAULT_MADVISE"><a class="permalink" href="#MAP_PREFAULT_MADVISE"><code class="Dv">MAP_PREFAULT_MADVISE</code></a></dt>
- <dd>Specify that the request is from a user process calling
- <a class="Xr">madvise(2)</a>.</dd>
- <dt id="MAP_ACC_CHARGED"><a class="permalink" href="#MAP_ACC_CHARGED"><code class="Dv">MAP_ACC_CHARGED</code></a></dt>
- <dd>Region is already charged to the requestor by some means.</dd>
- <dt id="MAP_ACC_NO_CHARGE"><a class="permalink" href="#MAP_ACC_NO_CHARGE"><code class="Dv">MAP_ACC_NO_CHARGE</code></a></dt>
- <dd>Do not charge for allocated region.</dd>
-</dl>
-<p class="Pp">The <var class="Vt">struct vm_map_entry</var> is a generic
- representation of a region. The region managed by each entry is associated
- with a <var class="Vt">union vm_map_object</var>, described below.</p>
-<div class="Bd Pp Bd-indent Li">
-<pre>struct vm_map_entry {
- struct vm_map_entry *prev;
- struct vm_map_entry *next;
- struct vm_map_entry *left;
- struct vm_map_entry *right;
- vm_offset_t start;
- vm_offset_t end;
- vm_offset_t avail_ssize;
- vm_size_t adj_free;
- vm_size_t max_free;
- union vm_map_object object;
- vm_ooffset_t offset;
- vm_eflags_t eflags;
- /* Only in task maps: */
- vm_prot_t protection;
- vm_prot_t max_protection;
- vm_inherit_t inheritance;
- int wired_count;
- vm_pindex_t lastr;
-};</pre>
-</div>
-<p class="Pp">The fields of <var class="Vt">struct vm_map_entry</var> are as
- follows:</p>
-<dl class="Bl-tag">
- <dt id="prev"><var class="Va">prev</var></dt>
- <dd>Pointer to the previous node in a doubly-linked, circular list.</dd>
- <dt id="next"><var class="Va">next</var></dt>
- <dd>Pointer to the next node in a doubly-linked, circular list.</dd>
- <dt id="left"><var class="Va">left</var></dt>
- <dd>Pointer to the left node in a binary search tree.</dd>
- <dt id="right"><var class="Va">right</var></dt>
- <dd>Pointer to the right node in a binary search tree.</dd>
- <dt id="start"><var class="Va">start</var></dt>
- <dd>Lower address bound of this entry's region.</dd>
- <dt id="end"><var class="Va">end</var></dt>
- <dd>Upper address bound of this entry's region.</dd>
- <dt id="avail_ssize"><var class="Va">avail_ssize</var></dt>
- <dd>If the entry is for a process stack, specifies how much the entry can
- grow.</dd>
- <dt id="adj_free"><var class="Va">adj_free</var></dt>
- <dd>The amount of free, unmapped address space adjacent to and immediately
- following this map entry.</dd>
- <dt id="max_free"><var class="Va">max_free</var></dt>
- <dd>The maximum amount of contiguous free space in this map entry's
- subtree.</dd>
- <dt id="object"><var class="Va">object</var></dt>
- <dd>Pointer to the <var class="Vt">struct vm_map_object</var> with which this
- entry is associated.</dd>
- <dt id="offset"><var class="Va">offset</var></dt>
- <dd>Offset within the <var class="Va">object</var> which is mapped from
- <var class="Va">start</var> onwards.</dd>
- <dt id="eflags"><var class="Va">eflags</var></dt>
- <dd>Flags applied to this entry, described below.</dd>
-</dl>
-<p class="Pp">The following five members are only valid for entries forming part
- of a user process's address space:</p>
-<dl class="Bl-tag">
- <dt id="protection"><var class="Va">protection</var></dt>
- <dd>Memory protection bits applied to this region.</dd>
- <dt id="max_protection"><var class="Va">max_protection</var></dt>
- <dd>Mask for the memory protection bits which may be actually be applied to
- this region.</dd>
- <dt id="inheritance"><var class="Va">inheritance</var></dt>
- <dd>Contains flags which specify how this entry should be treated during fork
- processing.</dd>
- <dt id="wired_count"><var class="Va">wired_count</var></dt>
- <dd>Count of how many times this entry has been wired into physical
- memory.</dd>
- <dt id="lastr"><var class="Va">lastr</var></dt>
- <dd>Contains the address of the last read which caused a page fault.</dd>
-</dl>
-<p class="Pp">The following flags may be applied to each entry, by specifying
- them as a mask within the <var class="Va">eflags</var> member:</p>
-<dl class="Bl-tag">
- <dt id="MAP_ENTRY_NOSYNC"><a class="permalink" href="#MAP_ENTRY_NOSYNC"><code class="Dv">MAP_ENTRY_NOSYNC</code></a></dt>
- <dd>The system should not flush the data associated with this map
- periodically, but only when it needs to.</dd>
- <dt id="MAP_ENTRY_IS_SUB_MAP"><a class="permalink" href="#MAP_ENTRY_IS_SUB_MAP"><code class="Dv">MAP_ENTRY_IS_SUB_MAP</code></a></dt>
- <dd>If set, then the <var class="Va">object</var> member specifies a
- subordinate map.</dd>
- <dt id="MAP_ENTRY_COW"><a class="permalink" href="#MAP_ENTRY_COW"><code class="Dv">MAP_ENTRY_COW</code></a></dt>
- <dd>Indicate that this is a copy-on-write region.</dd>
- <dt id="MAP_ENTRY_NEEDS_COPY"><a class="permalink" href="#MAP_ENTRY_NEEDS_COPY"><code class="Dv">MAP_ENTRY_NEEDS_COPY</code></a></dt>
- <dd>Indicate that a copy-on-write region needs to be copied.</dd>
- <dt id="MAP_ENTRY_NOFAULT"><a class="permalink" href="#MAP_ENTRY_NOFAULT"><code class="Dv">MAP_ENTRY_NOFAULT</code></a></dt>
- <dd>Specifies that accesses within this region should never cause a page
- fault. If a page fault occurs within this region, the system will
- panic.</dd>
- <dt id="MAP_ENTRY_USER_WIRED"><a class="permalink" href="#MAP_ENTRY_USER_WIRED"><code class="Dv">MAP_ENTRY_USER_WIRED</code></a></dt>
- <dd>Indicate that this region was wired on behalf of a user process.</dd>
- <dt id="MAP_ENTRY_BEHAV_NORMAL"><a class="permalink" href="#MAP_ENTRY_BEHAV_NORMAL"><code class="Dv">MAP_ENTRY_BEHAV_NORMAL</code></a></dt>
- <dd>The system should use the default paging behaviour for this region.</dd>
- <dt id="MAP_ENTRY_BEHAV_SEQUENTIAL"><a class="permalink" href="#MAP_ENTRY_BEHAV_SEQUENTIAL"><code class="Dv">MAP_ENTRY_BEHAV_SEQUENTIAL</code></a></dt>
- <dd>The system should depress the priority of pages immediately preceding each
- page within this region when faulted in.</dd>
- <dt id="MAP_ENTRY_BEHAV_RANDOM"><a class="permalink" href="#MAP_ENTRY_BEHAV_RANDOM"><code class="Dv">MAP_ENTRY_BEHAV_RANDOM</code></a></dt>
- <dd>Is a hint that pages within this region will be accessed randomly, and
- that prefetching is likely not advantageous.</dd>
- <dt id="MAP_ENTRY_IN_TRANSITION"><a class="permalink" href="#MAP_ENTRY_IN_TRANSITION"><code class="Dv">MAP_ENTRY_IN_TRANSITION</code></a></dt>
- <dd>Indicate that wiring or unwiring of an entry is in progress, and that
- other kernel threads should not attempt to modify fields in the
- structure.</dd>
- <dt id="MAP_ENTRY_NEEDS_WAKEUP"><a class="permalink" href="#MAP_ENTRY_NEEDS_WAKEUP"><code class="Dv">MAP_ENTRY_NEEDS_WAKEUP</code></a></dt>
- <dd>Indicate that there are kernel threads waiting for this region to become
- available.</dd>
- <dt id="MAP_ENTRY_NOCOREDUMP"><a class="permalink" href="#MAP_ENTRY_NOCOREDUMP"><code class="Dv">MAP_ENTRY_NOCOREDUMP</code></a></dt>
- <dd>The region should not be included in a core dump.</dd>
-</dl>
-<p class="Pp">The <var class="Va">inheritance</var> member has type
- <var class="Vt">vm_inherit_t</var>. This governs the inheritance behaviour
- for a map entry during fork processing. The following values are defined for
- <var class="Vt">vm_inherit_t</var>:</p>
-<dl class="Bl-tag">
- <dt id="VM_INHERIT_SHARE"><a class="permalink" href="#VM_INHERIT_SHARE"><code class="Dv">VM_INHERIT_SHARE</code></a></dt>
- <dd>The object associated with the entry should be cloned and shared with the
- new map. A new <var class="Vt">struct vm_object</var> will be created if
- necessary.</dd>
- <dt id="VM_INHERIT_COPY"><a class="permalink" href="#VM_INHERIT_COPY"><code class="Dv">VM_INHERIT_COPY</code></a></dt>
- <dd>The object associated with the entry should be copied to the new map.</dd>
- <dt id="VM_INHERIT_NONE"><a class="permalink" href="#VM_INHERIT_NONE"><code class="Dv">VM_INHERIT_NONE</code></a></dt>
- <dd>The entry should not be copied to the new map.</dd>
- <dt id="VM_INHERIT_DEFAULT"><a class="permalink" href="#VM_INHERIT_DEFAULT"><code class="Dv">VM_INHERIT_DEFAULT</code></a></dt>
- <dd>Specifies the default behaviour,
- <code class="Dv">VM_INHERIT_COPY</code>.</dd>
-</dl>
-<p class="Pp">The <var class="Vt">union vm_map_object</var> is used to specify
- the structure which a <var class="Vt">struct vm_map_entry</var> is
- associated with.</p>
-<p class="Pp">The fields of <var class="Vt">union vm_map_object</var> are as
- follows:</p>
-<div class="Bd Pp Bd-indent Li">
-<pre>union vm_map_object {
- struct vm_object *vm_object;
- struct vm_map *sub_map;
-};</pre>
-</div>
-<p class="Pp">Normally, the <var class="Va">sub_map</var> member is only used by
- system maps to indicate that a memory range is managed by a subordinate
- system map. Within a user process map, each <var class="Vt">struct
- vm_map_entry</var> is backed by a <var class="Vt">struct
- vm_object</var>.</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">pmap(9)</a>,
- <a class="Xr">vm_map_check_protection(9)</a>,
- <a class="Xr">vm_map_delete(9)</a>,
- <a class="Xr">vm_map_entry_resize_free(9)</a>,
- <a class="Xr">vm_map_find(9)</a>, <a class="Xr">vm_map_findspace(9)</a>,
- <a class="Xr">vm_map_inherit(9)</a>, <a class="Xr">vm_map_init(9)</a>,
- <a class="Xr">vm_map_insert(9)</a>, <a class="Xr">vm_map_lock(9)</a>,
- <a class="Xr">vm_map_lookup(9)</a>, <a class="Xr">vm_map_madvise(9)</a>,
- <a class="Xr">vm_map_max(9)</a>, <a class="Xr">vm_map_min(9)</a>,
- <a class="Xr">vm_map_pmap(9)</a>, <a class="Xr">vm_map_protect(9)</a>,
- <a class="Xr">vm_map_remove(9)</a>, <a class="Xr">vm_map_stack(9)</a>,
- <a class="Xr">vm_map_submap(9)</a>, <a class="Xr">vm_map_sync(9)</a>,
- <a class="Xr">vm_map_wire(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>
- &lt;<a class="Mt" href="mailto:bms@spc.org">bms@spc.org</a>&gt;.</p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">July 3, 2018</td>
- <td class="foot-os">FreeBSD 15.0</td>
- </tr>
-</table>