1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-16 00:01:05 -08:00
emacs/mps/manual/html/glossary/m.html
Gareth Rees 06057a4d52 Bring html up to date.
Copied from Perforce
 Change: 181168
 ServerID: perforce.ravenbrook.com
2013-03-18 15:13:54 +00:00

742 lines
No EOL
56 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Memory Management Glossary: M &mdash; Memory Pool System 1.111.0 documentation</title>
<link rel="stylesheet" href="../_static/mps.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.111.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="copyright" title="Copyright" href="../copyright.html" />
<link rel="top" title="Memory Pool System 1.111.0 documentation" href="../index.html" />
<link rel="up" title="Memory Management Glossary" href="index.html" />
<link rel="next" title="Memory Management Glossary: N" href="n.html" />
<link rel="prev" title="Memory Management Glossary: L" href="l.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="n.html" title="Memory Management Glossary: N"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="l.html" title="Memory Management Glossary: L"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">Memory Pool System 1.111.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Memory Management Glossary</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="memory-management-glossary-m">
<span id="glossary-m"></span><h1>Memory Management Glossary: M<a class="headerlink" href="#memory-management-glossary-m" title="Permalink to this headline"></a></h1>
<p class="glossary-alphabet"><a class="reference internal" href="a.html#glossary-a"><em>A</em></a>
| <a class="reference internal" href="b.html#glossary-b"><em>B</em></a>
| <a class="reference internal" href="c.html#glossary-c"><em>C</em></a>
| <a class="reference internal" href="d.html#glossary-d"><em>D</em></a>
| <a class="reference internal" href="e.html#glossary-e"><em>E</em></a>
| <a class="reference internal" href="f.html#glossary-f"><em>F</em></a>
| <a class="reference internal" href="g.html#glossary-g"><em>G</em></a>
| <a class="reference internal" href="h.html#glossary-h"><em>H</em></a>
| <a class="reference internal" href="i.html#glossary-i"><em>I</em></a>
| J
| <a class="reference internal" href="k.html#glossary-k"><em>K</em></a>
| <a class="reference internal" href="l.html#glossary-l"><em>L</em></a>
| <a class="reference internal" href="#glossary-m"><em>M</em></a>
| <a class="reference internal" href="n.html#glossary-n"><em>N</em></a>
| <a class="reference internal" href="o.html#glossary-o"><em>O</em></a>
| <a class="reference internal" href="p.html#glossary-p"><em>P</em></a>
| <a class="reference internal" href="q.html#glossary-q"><em>Q</em></a>
| <a class="reference internal" href="r.html#glossary-r"><em>R</em></a>
| <a class="reference internal" href="s.html#glossary-s"><em>S</em></a>
| <a class="reference internal" href="t.html#glossary-t"><em>T</em></a>
| <a class="reference internal" href="u.html#glossary-u"><em>U</em></a>
| <a class="reference internal" href="v.html#glossary-v"><em>V</em></a>
| <a class="reference internal" href="w.html#glossary-w"><em>W</em></a>
| X
| Y
| <a class="reference internal" href="z.html#glossary-z"><em>Z</em></a></p>
<dl class="glossary docutils">
<dt id="term-machine-word">machine word</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="w.html#term-word"><em class="xref std std-term">word</em></a>.</p>
</div>
</dd>
<dt id="term-main-memory">main memory</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>memory</em>, <em>primary storage</em>.</p>
</div>
<p>The <em>main memory</em> (or <em>primary storage</em>) of a computer is
<a class="reference internal" href="#term-memory-1"><em class="xref std std-term">memory<sup>(1)</sup></em></a> that is wired directly to the processor,
consisting of <a class="reference internal" href="r.html#term-ram"><em class="xref std std-term">RAM</em></a> and possibly <a class="reference internal" href="r.html#term-rom"><em class="xref std std-term">ROM</em></a>.</p>
<p>These terms are used in contrast to mass storage devices and
<a class="reference internal" href="c.html#term-cache-memory"><em class="xref std std-term">cache memory</em></a> (although we may note that when a program
accesses main memory, it is often actually interacting with a
cache).</p>
<p>Main memory is the middle level of the <a class="reference internal" href="#term-memory-hierarchy"><em class="xref std std-term">memory
hierarchy</em></a>: it is slower and cheaper than <a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">caches<sup>(1)</sup></em></a>,
but faster and more expensive than <a class="reference internal" href="b.html#term-backing-store"><em class="xref std std-term">backing store</em></a>.</p>
<p>It is common to refer only to the main memory of a computer;
for example, &#8220;This server has 128 GB of memory&#8221; and &#8220;OS X 10.8
requires at least 2 GB of memory&#8221;.</p>
<div class="admonition-historical-note admonition">
<p class="first admonition-title">Historical note</p>
<p class="last">Main memory used to be called <a class="reference internal" href="c.html#term-core"><em class="xref std std-term">core</em></a>, and is now
likewise often called <a class="reference internal" href="r.html#term-ram"><em class="xref std std-term">RAM</em></a>.</p>
</div>
<div class="admonition-similar-term last admonition">
<p class="first admonition-title">Similar terms</p>
<p class="last"><a class="reference internal" href="r.html#term-ram"><em class="xref std std-term">RAM</em></a>, <a class="reference internal" href="c.html#term-core"><em class="xref std std-term">core</em></a>, <a class="reference internal" href="p.html#term-physical-memory-1"><em class="xref std std-term">physical memory<sup>(1)</sup></em></a>.</p>
</div>
</dd>
<dt id="term-malloc">malloc</dt>
<dd><p class="first">A function in the standard <a class="reference internal" href="../mmref/lang.html#term-c"><em class="xref std std-term">C</em></a> library that performs
<a class="reference internal" href="d.html#term-dynamic-allocation"><em class="xref std std-term">dynamic allocation</em></a> of <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a>.</p>
<p>Many people use &#8220;malloc&#8221; as a verb to mean &#8220;allocate
dynamically&#8221;.</p>
<div class="admonition-similar-term admonition">
<p class="first admonition-title">Similar term</p>
<p class="last"><a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocate</em></a>.</p>
</div>
<div class="admonition-opposite-term last admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="f.html#term-free-2"><em class="xref std std-term">free<sup>(2)</sup></em></a>.</p>
</div>
</dd>
<dt id="term-manual-memory-management">manual memory management</dt>
<dd><p class="first">In some systems or languages, it is up to the application
program to manage all the bookkeeping details of
<a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocating</em></a> <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> from the
<a class="reference internal" href="h.html#term-heap"><em class="xref std std-term">heap</em></a> and <a class="reference internal" href="f.html#term-free-1"><em class="xref std std-term">freeing</em></a> it when no longer
required; this is known as manual <a class="reference internal" href="#term-memory-management"><em class="xref std std-term">memory management</em></a>.</p>
<p>Manual memory management may be appropriate for small
programs, but it does not scale well in general, nor does it
encourage modular or object-oriented programming.</p>
<p>To quote <a class="reference internal" href="../mmref/bib.html#joyner96"><em>Joyner (1996)</em></a>:</p>
<blockquote>
<div>In C++ the programmer must manually manage storage due to
the lack of <a class="reference internal" href="g.html#term-garbage-collection"><em class="xref std std-term">garbage collection</em></a>. This is the most
difficult bookkeeping task C++ programmers face, that
leads to two opposite problems: firstly, an object can be
<a class="reference internal" href="f.html#term-free-1"><em class="xref std std-term">deallocated</em></a> prematurely, while valid
<a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">references</em></a> still exist (<a class="reference internal" href="d.html#term-dangling-pointer"><em class="xref std std-term">dangling
pointers</em></a>); secondly, <a class="reference internal" href="d.html#term-dead"><em class="xref std std-term">dead</em></a> objects might not be
deallocated, leading to memory filling up with dead
objects (<a class="reference internal" href="#term-memory-leak"><em class="xref std std-term">memory leaks</em></a>). Attempts to correct either
problem can lead to overcompensation and the opposite
problem occurring. A correct system is a fine balance.</div></blockquote>
<div class="admonition-historical-note admonition">
<p class="first admonition-title">Historical note</p>
<p class="last">Manual memory management was common in early languages,
but <a class="reference internal" href="g.html#term-garbage-collection"><em class="xref std std-term">garbage collection</em></a> has been around since the
late 1950s, in languages like <a class="reference internal" href="../mmref/lang.html#term-lisp"><em class="xref std std-term">Lisp</em></a>. Most modern
languages use <a class="reference internal" href="a.html#term-automatic-memory-management"><em class="xref std std-term">automatic memory management</em></a>, and
some older languages have <a class="reference internal" href="c.html#term-conservative-garbage-collection"><em class="xref std std-term">conservative garbage
collection</em></a> extensions.</p>
</div>
<div class="admonition-opposite-term admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="a.html#term-automatic-memory-management"><em class="xref std std-term">automatic memory management</em></a>.</p>
</div>
<div class="admonition-in-the-mps last admonition">
<p class="first admonition-title">In the MPS</p>
<p class="last">Manual memory management can be used with <a class="reference internal" href="p.html#term-pool"><em class="xref std std-term">pools</em></a>
such as <a class="reference internal" href="../pool/mvff.html#pool-mvff"><em>MVFF (Manual Variable First Fit)</em></a> via the functions
<a class="reference internal" href="../topic/allocation.html#mps_alloc" title="mps_alloc"><tt class="xref c c-func docutils literal"><span class="pre">mps_alloc()</span></tt></a> and <a class="reference internal" href="../topic/allocation.html#mps_free" title="mps_free"><tt class="xref c c-func docutils literal"><span class="pre">mps_free()</span></tt></a>.</p>
</div>
</dd>
<dt id="term-mapped">mapped</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>committed</em>.</p>
</div>
<p>A range of <a class="reference internal" href="v.html#term-virtual-address"><em class="xref std std-term">virtual addresses</em></a> is said
to be <em>mapped</em> (<em>committed</em> on Windows) if there is
<a class="reference internal" href="p.html#term-physical-memory-2"><em class="xref std std-term">physical memory<sup>(2)</sup></em></a> associated with the range.</p>
<p>Note that, in some circumstances, the <a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a>
system could actually <a class="reference internal" href="o.html#term-overcommit"><em class="xref std std-term">overcommit</em></a> mapped memory.</p>
<div class="admonition-opposite-term admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="u.html#term-unmapped"><em class="xref std std-term">unmapped</em></a>.</p>
</div>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#term-mapping"><em class="xref std std-term">mapping</em></a>, <a class="reference internal" href="#term-memory-mapping"><em class="xref std std-term">memory mapping</em></a>, <a class="reference internal" href="#term-mmap"><em class="xref std std-term">mmap</em></a>.</p>
</div>
<div class="admonition-in-the-mps last admonition">
<p class="first admonition-title">In the MPS</p>
<p class="last">The term <em>committed</em> is used. The function
<a class="reference internal" href="../topic/arena.html#mps_arena_committed" title="mps_arena_committed"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_committed()</span></tt></a> returns the total committed
memory for an <a class="reference internal" href="a.html#term-arena"><em class="xref std std-term">arena</em></a>.</p>
</div>
</dd>
<dt id="term-mapping">mapping</dt>
<dd><p class="first">A <em>mapping</em> is a correspondence between a range of
<a class="reference internal" href="v.html#term-virtual-address"><em class="xref std std-term">virtual addresses</em></a> and some
<a class="reference internal" href="#term-memory-1"><em class="xref std std-term">memory<sup>(1)</sup></em></a> (or a <a class="reference internal" href="#term-memory-mapping"><em class="xref std std-term">memory-mapped</em></a> object). The physical location of the memory will be
managed by the <a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a> system.</p>
<p>Each <a class="reference internal" href="p.html#term-page"><em class="xref std std-term">page</em></a> in a mapping could be <a class="reference internal" href="p.html#term-paged-out"><em class="xref std std-term">paged out</em></a> or
<a class="reference internal" href="p.html#term-paged-in"><em class="xref std std-term">paged in</em></a>, and the locations it occupies in <a class="reference internal" href="#term-main-memory"><em class="xref std std-term">main
memory</em></a> and/or <a class="reference internal" href="s.html#term-swap-space"><em class="xref std std-term">swap space</em></a> might change over time.</p>
<p>The <a class="reference internal" href="v.html#term-virtual-address-space"><em class="xref std std-term">virtual address space</em></a> can contain of a complex set
of mappings. Typically, parts of the address space are
<a class="reference internal" href="#term-mapped"><em class="xref std std-term">mapped</em></a> (have a mapping assigned), others are
<a class="reference internal" href="r.html#term-reserved"><em class="xref std std-term">reserved</em></a> but unmapped, and most of it is entirely
<a class="reference internal" href="u.html#term-unmapped"><em class="xref std std-term">unmapped</em></a>.</p>
<div class="figure align-center">
<img alt="Diagram: Virtual memory with different kinds of mappings." src="../_images/mapped.svg" /><p class="caption">Virtual memory with different kinds of mappings.</p>
</div>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="b.html#term-backing-store"><em class="xref std std-term">backing store</em></a>.</p>
</div>
</dd>
<dt id="term-mark-compact">mark-compact</dt>
<dd><p class="first">Mark-compact collection is a kind of <a class="reference internal" href="t.html#term-tracing-garbage-collection"><em class="xref std std-term">tracing garbage
collection</em></a> that operates by <a class="reference internal" href="#term-marking"><em class="xref std std-term">marking</em></a> <a class="reference internal" href="r.html#term-reachable"><em class="xref std std-term">reachable</em></a>
<a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a>, then <a class="reference internal" href="c.html#term-compaction"><em class="xref std std-term">compacting</em></a>
the marked objects (which must include all the <a class="reference internal" href="l.html#term-live"><em class="xref std std-term">live</em></a>
objects).</p>
<p>The mark phase follows <a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">reference</em></a> chains to mark all
reachable objects; the compaction phase typically performs a
number of sequential passes over <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> to move
objects and update references. As a result of compaction, all
the marked objects are moved into a single contiguous
<a class="reference internal" href="b.html#term-block"><em class="xref std std-term">block</em></a> of memory (or a small number of such blocks);
the memory left unused after compaction is <a class="reference internal" href="r.html#term-recycle"><em class="xref std std-term">recycled</em></a>.</p>
<p>Mark-compact collection can be regarded as a variation of
<a class="reference internal" href="#term-mark-sweep"><em class="xref std std-term">mark-sweep collection</em></a>, with extra effort
spent to eliminate the resulting <a class="reference internal" href="f.html#term-fragmentation"><em class="xref std std-term">fragmentation</em></a>.
Compaction also allows the use of more efficient
<a class="reference internal" href="a.html#term-allocation-mechanism"><em class="xref std std-term">allocation mechanisms</em></a>, by
making large free blocks available.</p>
<div class="admonition-related-publication last admonition">
<p class="first admonition-title">Related publication</p>
<p class="last"><a class="reference internal" href="../mmref/bib.html#edwards"><em>Edwards</em></a>.</p>
</div>
</dd>
<dt id="term-mark-sweep"><span id="term-mark-and-sweep"></span>mark-sweep<br />mark-and-sweep</dt>
<dd><p class="first">Mark-sweep collection is a kind of <a class="reference internal" href="t.html#term-tracing-garbage-collection"><em class="xref std std-term">tracing garbage
collection</em></a> that operates by <a class="reference internal" href="#term-marking"><em class="xref std std-term">marking</em></a> <a class="reference internal" href="r.html#term-reachable"><em class="xref std std-term">reachable</em></a>
<a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a>, then <a class="reference internal" href="s.html#term-sweeping"><em class="xref std std-term">sweeping</em></a> over
<a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> and <a class="reference internal" href="r.html#term-recycle"><em class="xref std std-term">recycling</em></a> objects
that are unmarked (which must be <a class="reference internal" href="u.html#term-unreachable"><em class="xref std std-term">unreachable</em></a>), putting
them on a <a class="reference internal" href="f.html#term-free-list"><em class="xref std std-term">free list</em></a>.</p>
<p>The mark phase follows <a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">reference</em></a> chains to mark all
reachable objects; the sweep phase performs a sequential
(<a class="reference internal" href="a.html#term-address"><em class="xref std std-term">address</em></a>-order) pass over memory to recycle all
unmarked objects. A mark-sweep <a class="reference internal" href="c.html#term-collector-1"><em class="xref std std-term">collector<sup>(1)</sup></em></a> doesn&#8217;t
move objects.</p>
<div class="admonition-historical-note admonition">
<p class="first admonition-title">Historical note</p>
<p class="last">This was the first garbage collection algorithm, devised
by John McCarthy for <a class="reference internal" href="../mmref/lang.html#term-lisp"><em class="xref std std-term">Lisp</em></a>.</p>
</div>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#term-mark-compact"><em class="xref std std-term">mark-compact</em></a>.</p>
</div>
<div class="admonition-related-publication last admonition">
<p class="first admonition-title">Related publication</p>
<p class="last"><a class="reference internal" href="../mmref/bib.html#mccarthy60"><em>McCarthy (1960)</em></a>.</p>
</div>
</dd>
<dt id="term-marking">marking</dt>
<dd><p class="first">Marking is the first phase (&#8220;the mark phase&#8221;) of the
<a class="reference internal" href="#term-mark-sweep"><em class="xref std std-term">mark-sweep</em></a> algorithm or <a class="reference internal" href="#term-mark-compact"><em class="xref std std-term">mark-compact</em></a>
algorithm. It follows all <a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">references</em></a> from
a set of <a class="reference internal" href="r.html#term-root"><em class="xref std std-term">roots</em></a> to mark all the
<a class="reference internal" href="r.html#term-reachable"><em class="xref std std-term">reachable</em></a> <a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a>.</p>
<p>Marking follows <a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">reference</em></a> chains and makes some sort
of mark for each object it reaches.</p>
<p>Marking is often achieved by setting a bit in the object,
though any conservative representation of a predicate on the
<a class="reference internal" href="#term-memory-location"><em class="xref std std-term">memory location</em></a> of the object can be used. In
particular, storing the mark bit within the object can lead to
poor <a class="reference internal" href="l.html#term-locality-of-reference"><em class="xref std std-term">locality of reference</em></a>.</p>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="s.html#term-sweeping"><em class="xref std std-term">sweep</em></a>, <a class="reference internal" href="c.html#term-compaction"><em class="xref std std-term">compact</em></a>.</p>
</div>
</dd>
<dt id="term-mb">MB</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="#term-megabyte"><em class="xref std std-term">megabyte</em></a>.</p>
</div>
</dd>
<dt id="term-megabyte">megabyte</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>MB</em>.</p>
</div>
<p>A megabyte is 1024 <a class="reference internal" href="k.html#term-kilobyte"><em class="xref std std-term">kilobytes</em></a>, or 1048576
<a class="reference internal" href="b.html#term-byte-1"><em class="xref std std-term">byte<sup>(1)</sup></em></a>.</p>
<p class="last">See <a class="reference internal" href="b.html#term-byte-1"><em class="xref std std-term">byte<sup>(1)</sup></em></a> for general information on this and
related quantities.</p>
</dd>
<dt id="term-memoization">memoization</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="c.html#term-caching-3"><em class="xref std std-term">caching<sup>(3)</sup></em></a>.</p>
</div>
</dd>
<dt id="term-memory-1">memory<sup>(1)</sup></dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>storage</em>, <em>store</em>.</p>
</div>
<p><em>memory</em> or <em>storage</em> (or <em>store</em>) is where data and
instructions are stored. For example, <a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">caches<sup>(1)</sup></em></a>, <a class="reference internal" href="#term-main-memory"><em class="xref std std-term">main memory</em></a>, floppy and hard disks are
all storage devices.</p>
<p>These terms are also used for the capacity of a system to
store data, and may be applied to the sum total of all the
storage devices attached to a computer.</p>
<div class="admonition-historical-note last admonition">
<p class="first admonition-title">Historical note</p>
<p class="last">&#8220;Store&#8221; is old-fashioned, but survives in expressions such
as &#8220;<a class="reference internal" href="b.html#term-backing-store"><em class="xref std std-term">backing store</em></a>&#8221;.</p>
</div>
</dd>
<dt id="term-memory-2">memory<sup>(2)</sup></dt>
<dd><p class="first"><em>Memory</em> refers to <a class="reference internal" href="#term-memory-1"><em class="xref std std-term">memory<sup>(1)</sup></em></a> that can be accessed by
the processor directly (using memory addressing instructions).</p>
<p class="last">This could be <a class="reference internal" href="r.html#term-real-memory-1"><em class="xref std std-term">real memory<sup>(1)</sup></em></a> or <a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a>.</p>
</dd>
<dt id="term-memory-3">memory<sup>(3)</sup></dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="#term-main-memory"><em class="xref std std-term">main memory</em></a>.</p>
</div>
</dd>
<dt id="term-memory-4">memory<sup>(4)</sup></dt>
<dd>A <a class="reference internal" href="#term-memory-location"><em class="xref std std-term">memory location</em></a>; for example, &#8220;My digital watch has
256 memories.&#8221;</dd>
<dt id="term-memory-bandwidth">memory bandwidth</dt>
<dd><p class="first">Memory bandwidth (by analogy with the term <em>bandwidth</em> from
communication theory) is a measure of how quickly information
(expressed in terms of bits) can be transferred between two
places in a computer system.</p>
<p class="last">Often the term is applied to a measure of how quickly the
processor can obtain information from the <a class="reference internal" href="#term-main-memory"><em class="xref std std-term">main memory</em></a>
(for example, &#8220;My new bus design has a bandwidth of over 400
Megabytes per second&#8221;).</p>
</dd>
<dt id="term-memory-cache">memory cache</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">cache<sup>(1)</sup></em></a>.</p>
</div>
</dd>
<dt id="term-memory-hierarchy">memory hierarchy</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="s.html#term-storage-hierarchy"><em class="xref std std-term">storage hierarchy</em></a>.</p>
</div>
</dd>
<dt id="term-memory-leak">memory leak</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>leak</em>, <em>space leak</em>, <em>space-leak</em>.</p>
</div>
<p>A memory leak is where <a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocated</em></a> <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> is
not <a class="reference internal" href="f.html#term-free-1"><em class="xref std std-term">freed<sup>(1)</sup></em></a> although it is never used again.</p>
<p>In <a class="reference internal" href="#term-manual-memory-management"><em class="xref std std-term">manual memory management</em></a>, this usually occurs
because <a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a> become <a class="reference internal" href="u.html#term-unreachable"><em class="xref std std-term">unreachable</em></a> without
being <a class="reference internal" href="f.html#term-free-1"><em class="xref std std-term">freed<sup>(1)</sup></em></a>.</p>
<p>In <a class="reference internal" href="t.html#term-tracing-garbage-collection"><em class="xref std std-term">tracing garbage collection</em></a>, this happens when
objects are <a class="reference internal" href="r.html#term-reachable"><em class="xref std std-term">reachable</em></a> but not <a class="reference internal" href="l.html#term-live"><em class="xref std std-term">live</em></a>.</p>
<p>In <a class="reference internal" href="r.html#term-reference-counting"><em class="xref std std-term">reference counting</em></a>, this happens when objects are
<a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">referenced</em></a> but not <a class="reference internal" href="l.html#term-live"><em class="xref std std-term">live</em></a>. (Such objects may or
may not be <a class="reference internal" href="r.html#term-reachable"><em class="xref std std-term">reachable</em></a>.)</p>
<p class="last">Repeated memory leaks cause the memory usage of a process to
grow without bound.</p>
</dd>
<dt id="term-memory-location">memory location</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>location</em>.</p>
</div>
<p class="last">Each separately-<a class="reference internal" href="a.html#term-address"><em class="xref std std-term">addressable</em></a> unit of
<a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> in which data can be stored is called a
<em>memory location</em>. Usually, these hold a <a class="reference internal" href="b.html#term-byte-2"><em class="xref std std-term">byte<sup>(2)</sup></em></a>, but
the term can refer to <a class="reference internal" href="w.html#term-word"><em class="xref std std-term">words</em></a>.</p>
</dd>
<dt id="term-memory-management">memory management</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>storage management</em>.</p>
</div>
<p>Memory management is the art and the process of coordinating
and controlling the use of <a class="reference internal" href="#term-memory-1"><em class="xref std std-term">memory<sup>(1)</sup></em></a> in a computer
system.</p>
<p>Memory management can be divided into three areas:</p>
<ol class="arabic simple">
<li>Memory management hardware (<a class="reference internal" href="#term-mmu"><em class="xref std std-term">MMUs</em></a>,
<a class="reference internal" href="r.html#term-ram"><em class="xref std std-term">RAM</em></a>, etc.);</li>
<li>Operating system memory management (<a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a>,
<a class="reference internal" href="p.html#term-protection"><em class="xref std std-term">protection</em></a>);</li>
<li>Application memory management (<a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocation</em></a>, <a class="reference internal" href="f.html#term-free-1"><em class="xref std std-term">deallocation</em></a>, <a class="reference internal" href="g.html#term-garbage-collection"><em class="xref std std-term">garbage
collection</em></a>).</li>
</ol>
<p>Memory management hardware consists of the electronic devices
and associated circuitry that store the state of a computer.
These devices include RAM, MMUs (memory management units),
<a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">cache<sup>(1)</sup></em></a>, disks, and processor
<a class="reference internal" href="r.html#term-register"><em class="xref std std-term">registers</em></a>. The design of memory hardware is
critical to the performance of modern computer systems. In
fact, <a class="reference internal" href="#term-memory-bandwidth"><em class="xref std std-term">memory bandwidth</em></a> is perhaps the main limiting
factor on system performance.</p>
<p>Operating system memory management is concerned with using the
memory management hardware to manage the resources of the
<a class="reference internal" href="s.html#term-storage-hierarchy"><em class="xref std std-term">storage hierarchy</em></a> and allocating them to the various
activities running on a computer. The most significant part of
this on many systems is <a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a>, which
creates the illusion that every process has more memory than
is actually available. OS memory management is also concerned
with <a class="reference internal" href="#term-memory-protection"><em class="xref std std-term">memory protection</em></a> and security, which help to
maintain the integrity of the operating system against
accidental damage or deliberate attack. It also protects user
programs from errors in other programs.</p>
<p>Application memory management involves obtaining <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> from the operating system, and managing its use by an
application program. Application programs have dynamically
changing storage requirements. The application <a class="reference internal" href="#term-memory-manager"><em class="xref std std-term">memory
manager</em></a> must cope with this while minimizing the total CPU
overhead, interactive pause times, and the total memory used.</p>
<p>While the operating system may create the illusion of nearly
infinite memory, it is a complex task to manage application
memory so that the application can run most efficiently.
Ideally, these problems should be solved by tried and tested
tools, tuned to a specific application.</p>
<p>The Memory Management Reference is mostly concerned with
application memory management.</p>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="a.html#term-automatic-memory-management"><em class="xref std std-term">automatic memory management</em></a>, <a class="reference internal" href="#term-manual-memory-management"><em class="xref std std-term">manual memory management</em></a>.</p>
</div>
</dd>
<dt id="term-memory-management-unit">Memory Management Unit</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="#term-mmu"><em class="xref std std-term">MMU</em></a>.</p>
</div>
</dd>
<dt id="term-memory-manager">memory manager</dt>
<dd><p class="first">The memory manager is that part of the system that manages
<a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a>, servicing <a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocation</em></a>
requests, and <a class="reference internal" href="r.html#term-recycle"><em class="xref std std-term">recycling</em></a> memory, either
<a class="reference internal" href="#term-manual-memory-management"><em class="xref std std-term">manually</em></a> or
<a class="reference internal" href="a.html#term-automatic-memory-management"><em class="xref std std-term">automatically</em></a>.</p>
<p>The memory manager can have a significant effect on the
efficiency of the program; it is not unusual for a program to
spend 20% of its time managing memory.</p>
<div class="admonition-similar-term admonition">
<p class="first admonition-title">Similar terms</p>
<p class="last"><a class="reference internal" href="a.html#term-allocator"><em class="xref std std-term">allocator</em></a>, <a class="reference internal" href="c.html#term-collector-1"><em class="xref std std-term">collector<sup>(1)</sup></em></a>.</p>
</div>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#term-memory-management"><em class="xref std std-term">memory management</em></a>.</p>
</div>
</dd>
<dt id="term-memory-mapping">memory mapping</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>file mapping</em>.</p>
</div>
<p><em>Memory mapping</em> is the technique of making a part of the
<a class="reference internal" href="a.html#term-address-space"><em class="xref std std-term">address space</em></a> appear to contain an &#8220;object&#8221;, such as a
file or device, so that ordinary <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> accesses
act on that object.</p>
<p>The object is said to be <em>mapped</em> to that range of addresses.
(The term &#8220;object&#8221; does not mean a program <a class="reference internal" href="o.html#term-object"><em class="xref std std-term">object</em></a>. It
comes from Unix terminology on the <a class="reference internal" href="#term-mmap"><em class="xref std std-term">mmap</em></a> man page.)</p>
<div class="figure align-center">
<img alt="Diagram: An address space with a range mapped to part of an object." src="../_images/mapping.svg" /><p class="caption">An address space with a range mapped to part of an object.</p>
</div>
<p>Memory mapping uses the same mechanism as <a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual
memory</em></a> to &#8220;trap&#8221; accesses to parts of the <a class="reference internal" href="a.html#term-address-space"><em class="xref std std-term">address
space</em></a>, so that data from the file or device can be
<a class="reference internal" href="p.html#term-paged-in"><em class="xref std std-term">paged in</em></a> (and other parts <a class="reference internal" href="p.html#term-paged-out"><em class="xref std std-term">paged out</em></a>) before
the access is completed.</p>
<div class="admonition-historical-note admonition">
<p class="first admonition-title">Historical note</p>
<p class="last">File mapping is available on most modern Unix and Windows
systems. However, it has a much longer history. In
Multics, it was the primary way of accessing files.</p>
</div>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#term-mapped"><em class="xref std std-term">mapped</em></a>.</p>
</div>
</dd>
<dt id="term-memory-protection">memory protection</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="p.html#term-protection"><em class="xref std std-term">protection</em></a>.</p>
</div>
</dd>
<dt id="term-message">message</dt>
<dd><div class="admonition-in-the-mps first last admonition">
<p class="first admonition-title">In the MPS</p>
<p class="last">A data structure which the MPS uses to communicate with
the <a class="reference internal" href="c.html#term-client-program"><em class="xref std std-term">client program</em></a>. See <a class="reference internal" href="../topic/message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd>
<dt id="term-message-queue">message queue</dt>
<dd><div class="admonition-in-the-mps first last admonition">
<p class="first admonition-title">In the MPS</p>
<p class="last">A queue of <a class="reference internal" href="#term-message"><em class="xref std std-term">messages</em></a> posted by an
<a class="reference internal" href="a.html#term-arena"><em class="xref std std-term">arena</em></a>. It can be queried by calling
<a class="reference internal" href="../topic/message.html#mps_message_poll" title="mps_message_poll"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_poll()</span></tt></a>,
<a class="reference internal" href="../topic/message.html#mps_message_queue_type" title="mps_message_queue_type"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_queue_type()</span></tt></a>, or
<a class="reference internal" href="../topic/message.html#mps_message_get" title="mps_message_get"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_get()</span></tt></a>. See <a class="reference internal" href="../topic/message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd>
<dt id="term-message-type">message type</dt>
<dd><div class="admonition-in-the-mps first last admonition">
<p class="first admonition-title">In the MPS</p>
<p class="last">A value of type <a class="reference internal" href="../topic/message.html#mps_message_type_t" title="mps_message_type_t"><tt class="xref c c-type docutils literal"><span class="pre">mps_message_type_t</span></tt></a> describing
the type of a <a class="reference internal" href="#term-message"><em class="xref std std-term">message</em></a>. There are three message
types: <a class="reference internal" href="../topic/finalization.html#mps_message_type_finalization" title="mps_message_type_finalization"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_type_finalization()</span></tt></a>,
<a class="reference internal" href="../topic/collection.html#mps_message_type_gc" title="mps_message_type_gc"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_type_gc()</span></tt></a>, and
<a class="reference internal" href="../topic/collection.html#mps_message_type_gc_start" title="mps_message_type_gc_start"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_type_gc_start()</span></tt></a>. See
<a class="reference internal" href="../topic/message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd>
<dt id="term-misaligned">misaligned</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="u.html#term-unaligned"><em class="xref std std-term">unaligned</em></a>.</p>
</div>
</dd>
<dt id="term-miss">miss</dt>
<dd><p class="first">A miss is a lookup failure in any form of <a class="reference internal" href="c.html#term-caching-3"><em class="xref std std-term">cache<sup>(3)</sup></em></a>, most commonly at some level of a
<a class="reference internal" href="s.html#term-storage-hierarchy"><em class="xref std std-term">storage hierarchy</em></a>, such as a <a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">cache<sup>(1)</sup></em></a> or
<a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a> system.</p>
<p>The cost of a miss in a virtual memory system is considerable:
it may be five orders of magnitude more costly than a hit. In
some systems, such as multi-process operating systems, other
work may be done while a miss is serviced.</p>
<div class="admonition-opposite-term admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="h.html#term-hit"><em class="xref std std-term">hit</em></a>.</p>
</div>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#term-miss-rate"><em class="xref std std-term">miss rate</em></a>.</p>
</div>
</dd>
<dt id="term-miss-rate">miss rate</dt>
<dd><p class="first">At any level of a <a class="reference internal" href="s.html#term-storage-hierarchy"><em class="xref std std-term">storage hierarchy</em></a>, the miss rate is
the proportion of accesses which <a class="reference internal" href="#term-miss"><em class="xref std std-term">miss</em></a>.</p>
<p>Because misses are very costly, each level is designed to
minimize the miss rate. For instance, in <a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">caches<sup>(1)</sup></em></a>,
miss rates of about 0.01 may be acceptable, whereas in
<a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a> systems, acceptable miss rates are much
lower (say 0.00005). If a system has a miss rate which is too
high, it will spend most of its time servicing the misses, and
is said to <a class="reference internal" href="t.html#term-thrash"><em class="xref std std-term">thrash</em></a>.</p>
<p>Miss rates may also be given as a number of misses per unit
time, or per instruction.</p>
<div class="admonition-opposite-term last admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="h.html#term-hit-rate"><em class="xref std std-term">hit rate</em></a>.</p>
</div>
</dd>
<dt id="term-mmap">mmap</dt>
<dd><tt class="docutils literal"><span class="pre">mmap</span></tt> is a system call provided on many Unix systems to
create a <a class="reference internal" href="#term-mapping"><em class="xref std std-term">mapping</em></a> for a range of <a class="reference internal" href="v.html#term-virtual-address"><em class="xref std std-term">virtual
addresses</em></a>.</dd>
<dt id="term-mmu">MMU</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>Memory Management Unit</em>.</p>
</div>
<p>The MMU (Memory Management Unit) is a hardware device
responsible for handling <a class="reference internal" href="#term-memory-2"><em class="xref std std-term">memory<sup>(2)</sup></em></a> accesses requested
by the main processor.</p>
<p>This typically involves translation of <a class="reference internal" href="v.html#term-virtual-address"><em class="xref std std-term">virtual
addresses</em></a> to <a class="reference internal" href="p.html#term-physical-address"><em class="xref std std-term">physical addresses</em></a>, <a class="reference internal" href="c.html#term-cache-1"><em class="xref std std-term">cache<sup>(1)</sup></em></a>
control, bus arbitration, <a class="reference internal" href="#term-memory-protection"><em class="xref std std-term">memory protection</em></a>, and the
generation of various exceptions. Not all processors have an
MMU.</p>
<div class="admonition-see-also last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="v.html#term-virtual-memory"><em class="xref std std-term">virtual memory</em></a>, <a class="reference internal" href="p.html#term-page-fault"><em class="xref std std-term">page fault</em></a>, <a class="reference internal" href="s.html#term-segmentation-violation"><em class="xref std std-term">segmentation violation</em></a>.</p>
</div>
</dd>
<dt id="term-mostly-copying-garbage-collection">mostly-copying garbage collection</dt>
<dd><p class="first">A type of <a class="reference internal" href="s.html#term-semi-conservative-garbage-collection"><em class="xref std std-term">semi-conservative</em></a> <a class="reference internal" href="t.html#term-tracing-garbage-collection"><em class="xref std std-term">tracing garbage collection</em></a> which permits
<a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a> to <a class="reference internal" href="#term-moving-garbage-collector"><em class="xref std std-term">move</em></a> if
no <a class="reference internal" href="a.html#term-ambiguous-reference"><em class="xref std std-term">ambiguous references</em></a> point to them.</p>
<p>The techniques used are a hybrid of <a class="reference internal" href="c.html#term-copying-garbage-collection"><em class="xref std std-term">copying garbage
collection</em></a> and <a class="reference internal" href="#term-mark-sweep"><em class="xref std std-term">mark-sweep</em></a>.</p>
<p>Mostly-copying garbage collectors share many of the benefits
of copying collectors, including <a class="reference internal" href="c.html#term-compaction"><em class="xref std std-term">compaction</em></a>. Since
they support ambiguous references they are additionally
suitable for use with uncooperative compilers, and may be an
efficient choice for multi-threaded systems.</p>
<div class="admonition-related-publication last admonition">
<p class="first admonition-title">Related publications</p>
<p class="last"><a class="reference internal" href="../mmref/bib.html#bartlett89"><em>Bartlett (1989)</em></a>, <a class="reference internal" href="../mmref/bib.html#yip91"><em>Yip (1991)</em></a>.</p>
</div>
</dd>
<dt id="term-mostly-exact-garbage-collection">mostly-exact garbage collection</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="s.html#term-semi-conservative-garbage-collection"><em class="xref std std-term">semi-conservative garbage collection</em></a>.</p>
</div>
</dd>
<dt id="term-mostly-precise-garbage-collection">mostly-precise garbage collection</dt>
<dd><div class="admonition-see first last admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="s.html#term-semi-conservative-garbage-collection"><em class="xref std std-term">semi-conservative garbage collection</em></a>.</p>
</div>
</dd>
<dt id="term-moving-garbage-collector"><span id="term-moving-memory-manager"></span>moving garbage collector<br />moving memory manager</dt>
<dd><p class="first">A memory manager (often a <a class="reference internal" href="g.html#term-garbage-collector"><em class="xref std std-term">garbage collector</em></a>) is said
to be <em>moving</em> if <a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocated</em></a> <a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a> can move
during their lifetimes.</p>
<div class="admonition-relevance-to-memory-management admonition">
<p class="first admonition-title">Relevance to memory management</p>
<p class="last">In the garbage collecting world this will apply to
<a class="reference internal" href="c.html#term-copying-garbage-collection"><em class="xref std std-term">copying</em></a> collectors
and to <a class="reference internal" href="#term-mark-compact"><em class="xref std std-term">mark-compact</em></a> collectors. It may also refer
to <a class="reference internal" href="r.html#term-replicating-garbage-collector"><em class="xref std std-term">replicating</em></a>
collectors.</p>
</div>
<div class="admonition-similar-term admonition">
<p class="first admonition-title">Similar term</p>
<p class="last"><a class="reference internal" href="c.html#term-copying-garbage-collection"><em class="xref std std-term">copying garbage collection</em></a>.</p>
</div>
<div class="admonition-opposite-term last admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="n.html#term-non-moving-garbage-collector"><em class="xref std std-term">non-moving garbage collector</em></a>.</p>
</div>
</dd>
<dt id="term-mutable">mutable</dt>
<dd><p class="first">Any <a class="reference internal" href="o.html#term-object"><em class="xref std std-term">object</em></a> which may be changed by a program is
<em>mutable</em>.</p>
<div class="admonition-opposite-term last admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="i.html#term-immutable"><em class="xref std std-term">immutable</em></a>.</p>
</div>
</dd>
<dt id="term-mutator">mutator</dt>
<dd><div class="admonition-also-known-as first admonition">
<p class="first admonition-title">Also known as</p>
<p class="last"><em>client program</em>.</p>
</div>
<p>In a <a class="reference internal" href="g.html#term-garbage-collection"><em class="xref std std-term">garbage-collected</em></a> system,
the part that executes the user code, which <a class="reference internal" href="a.html#term-allocate"><em class="xref std std-term">allocates</em></a> <a class="reference internal" href="o.html#term-object"><em class="xref std std-term">objects</em></a> and modifies, or
<em>mutates</em>, them.</p>
<p>For purposes of describing <a class="reference internal" href="i.html#term-incremental-garbage-collection"><em class="xref std std-term">incremental garbage
collection</em></a>, the system is divided into the <em>mutator</em> and the
<a class="reference internal" href="c.html#term-collector-2"><em class="xref std std-term">collector<sup>(2)</sup></em></a>. These can be separate threads of
computation, or interleaved within the same thread.</p>
<p>The user code issues allocation requests, but the allocator
code is usually considered part of the collector. Indeed, one
of the major ways of scheduling the other work of the
collector is to perform a little of it at every allocation.</p>
<p>While the mutator mutates, it implicitly <a class="reference internal" href="f.html#term-free-1"><em class="xref std std-term">frees</em></a> <a class="reference internal" href="#term-memory-1"><em class="xref std std-term">memory<sup>(1)</sup></em></a> by overwriting <a class="reference internal" href="r.html#term-reference"><em class="xref std std-term">references</em></a>.</p>
<div class="admonition-historical-note admonition">
<p class="first admonition-title">Historical note</p>
<p class="last">This term is due to <a class="reference internal" href="../mmref/bib.html#dlmss76"><em>Dijkstra et al. (1976)</em></a>.</p>
</div>
<div class="admonition-opposite-term admonition">
<p class="first admonition-title">Opposite term</p>
<p class="last"><a class="reference internal" href="c.html#term-collector-2"><em class="xref std std-term">collector<sup>(2)</sup></em></a>.</p>
</div>
<div class="admonition-in-the-mps last admonition">
<p class="first admonition-title">In the MPS</p>
<p class="last">The MPS documentation uses the term <a class="reference internal" href="c.html#term-client-program"><em class="xref std std-term">client program</em></a>
to refer to the mutator.</p>
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/logo.png" alt="Logo"/>
</a></p>
<h4>Previous topic</h4>
<p class="topless"><a href="l.html"
title="previous chapter">Memory Management Glossary: L</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="n.html"
title="next chapter">Memory Management Glossary: N</a></p><h4>Downloads</h4>
<p class="topless">
<a href="http://www.ravenbrook.com/project/mps/release/1.111.0/">MPS Kit release 1.111.0</a><br>
<a href="http://www.ravenbrook.com/project/mps/release/">All MPS Kit releases</a>
</p>
<h4>Issues</h4>
<p class="topless">
<a href="http://www.ravenbrook.com/project/mps/issue/?action=list&amp;view=status%3dopen&amp;display=Job:Priority:Title&amp;sort=Priority">Known issues</a><br>
<a href="http://www.ravenbrook.com/project/mps/issue/?action=fixed&release_fixed=1.111.0">Issues fixed in release 1.111.0</a>
</p><h4>Contact us</h4>
<p class="topless"><a href="mailto:mps-questions@ravenbrook.com">mps-questions@ravenbrook.com</a></p>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="n.html" title="Memory Management Glossary: N"
>next</a> |</li>
<li class="right" >
<a href="l.html" title="Memory Management Glossary: L"
>previous</a> |</li>
<li><a href="../index.html">Memory Pool System 1.111.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Memory Management Glossary</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; <a href="../copyright.html">Copyright</a> 2013, Ravenbrook Limited.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>