1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
emacs/mps/manual/html/topic/collection.html
Gareth Rees eaad4493d4 Bring html up to date.
Copied from Perforce
 Change: 181731
 ServerID: perforce.ravenbrook.com
2013-05-11 20:07:28 +01:00

386 lines
No EOL
30 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>11. Garbage collection &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="Reference" href="index.html" />
<link rel="next" title="12. Messages" href="message.html" />
<link rel="prev" title="10. Roots" href="root.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="message.html" title="12. Messages"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="root.html" title="10. Roots"
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">Reference</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="garbage-collection">
<span id="topic-collection"></span><span id="index-0"></span><h1>11. Garbage collection<a class="headerlink" href="#garbage-collection" title="Permalink to this headline"></a></h1>
<div class="section" id="generation-chains">
<span id="index-1"></span><h2>11.1. Generation chains<a class="headerlink" href="#generation-chains" title="Permalink to this headline"></a></h2>
<p>A <a class="reference internal" href="../glossary/g.html#term-generation-chain"><em class="xref std std-term">generation chain</em></a> describes the structure of the
<a class="reference internal" href="../glossary/g.html#term-generation"><em class="xref std std-term">generations</em></a> in a set of <a class="reference internal" href="../glossary/a.html#term-automatic-memory-management"><em class="xref std std-term">automatically managed</em></a> <a class="reference internal" href="../glossary/p.html#term-pool"><em class="xref std std-term">pools</em></a>. The same generation
chain should be used for all pools whose blocks live and die together.</p>
<p>Create a generation chain by preparing an array of
<a class="reference internal" href="#mps_gen_param_s" title="mps_gen_param_s"><tt class="xref c c-type docutils literal"><span class="pre">mps_gen_param_s</span></tt></a> structures giving the <em>capacity</em> (in
kilobytes) and <em>predicted mortality</em> (between 0 and 1) of each
generation, and passing them to <a class="reference internal" href="#mps_chain_create" title="mps_chain_create"><tt class="xref c c-func docutils literal"><span class="pre">mps_chain_create()</span></tt></a>.</p>
<p>When the size of the generation exceeds the capacity, the MPS will be
prepared to start collecting the generation. See
<a class="reference internal" href="#topic-collection-schedule"><em>Scheduling of collections</em></a> below.</p>
<p>For example:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="n">mps_gen_param_s</span> <span class="n">gen_params</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span>
<span class="p">{</span> <span class="mi">1024</span><span class="p">,</span> <span class="mf">0.8</span> <span class="p">},</span>
<span class="p">{</span> <span class="mi">2048</span><span class="p">,</span> <span class="mf">0.4</span> <span class="p">},</span>
<span class="p">};</span>
<span class="n">mps_chain_t</span> <span class="n">chain</span><span class="p">;</span>
<span class="n">mps_res_t</span> <span class="n">res</span><span class="p">;</span>
<span class="n">res</span> <span class="o">=</span> <span class="n">mps_chain_create</span><span class="p">(</span><span class="o">&amp;</span><span class="n">chain</span><span class="p">,</span> <span class="n">arena</span><span class="p">,</span>
<span class="k">sizeof</span><span class="p">(</span><span class="n">gen_params</span><span class="p">)</span> <span class="o">/</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">gen_params</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span>
<span class="n">gen_params</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="n">res</span> <span class="o">!=</span> <span class="n">MPS_RES_OK</span><span class="p">)</span> <span class="n">error</span><span class="p">(</span><span class="s">&quot;Couldn&#39;t create chain&quot;</span><span class="p">);</span>
</pre></div>
</div>
<dl class="type">
<dt id="mps_chain_t">
<tt class="descname">mps_chain_t</tt><a class="headerlink" href="#mps_chain_t" title="Permalink to this definition"></a></dt>
<dd><p>The type of <a class="reference internal" href="../glossary/g.html#term-generation-chain"><em class="xref std std-term">generation chains</em></a>. A
generation chain describes the structure of <a class="reference internal" href="../glossary/g.html#term-generation"><em class="xref std std-term">generations</em></a> in a <a class="reference internal" href="../glossary/p.html#term-pool"><em class="xref std std-term">pool</em></a>.</p>
</dd></dl>
<dl class="type">
<dt id="mps_gen_param_s">
<tt class="descname">mps_gen_param_s</tt><a class="headerlink" href="#mps_gen_param_s" title="Permalink to this definition"></a></dt>
<dd><p>The type of the structure used to specify a <a class="reference internal" href="../glossary/g.html#term-generation"><em class="xref std std-term">generation</em></a> in
a <a class="reference internal" href="../glossary/g.html#term-generation-chain"><em class="xref std std-term">generation chain</em></a>.</p>
<div class="highlight-c"><div class="highlight"><pre><span class="k">typedef</span> <span class="k">struct</span> <span class="n">mps_gen_param_s</span> <span class="p">{</span>
<span class="kt">size_t</span> <span class="n">mps_capacity</span><span class="p">;</span>
<span class="kt">double</span> <span class="n">mps_mortality</span><span class="p">;</span>
<span class="p">}</span> <span class="n">mps_gen_param_s</span><span class="p">;</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">mps_capacity</span></tt> is the capacity of the generation, in
<a class="reference internal" href="../glossary/k.html#term-kilobyte"><em class="xref std std-term">kilobytes</em></a>. When the size of the generation
exceeds this, the MPS will be prepared to start collecting it.</p>
<p><tt class="docutils literal"><span class="pre">mps_mortality</span></tt> is the predicted mortality of the generation:
the proportion (between 0 and 1) of blocks in the generation that
are expected to be <a class="reference internal" href="../glossary/d.html#term-dead"><em class="xref std std-term">dead</em></a> when the generation is collected.</p>
<p>These numbers are hints to the MPS that it may use to make
decisions about when and what to collect: nothing will go wrong
(other than suboptimal performance) if you make poor
choices. See <a class="reference internal" href="#topic-collection-schedule"><em>Scheduling of collections</em></a>.</p>
</dd></dl>
<dl class="function">
<dt id="mps_chain_create">
<a class="reference internal" href="error.html#mps_res_t" title="mps_res_t">mps_res_t</a> <tt class="descname">mps_chain_create</tt><big>(</big><a class="reference internal" href="#mps_chain_t" title="mps_chain_t">mps_chain_t</a><em>&nbsp;*chain_o</em>, <a class="reference internal" href="arena.html#mps_arena_t" title="mps_arena_t">mps_arena_t</a><em>&nbsp;arena</em>, size_t<em>&nbsp;gen_count</em>, <a class="reference internal" href="#mps_gen_param_s" title="mps_gen_param_s">mps_gen_param_s</a><em>&nbsp;*gen_params</em><big>)</big><a class="headerlink" href="#mps_chain_create" title="Permalink to this definition"></a></dt>
<dd><p>Create a <a class="reference internal" href="../glossary/g.html#term-generation-chain"><em class="xref std std-term">generation chain</em></a>.</p>
<p><tt class="docutils literal"><span class="pre">chain_o</span></tt> points to a location that will hold a pointer to the
new generation chain.</p>
<p><tt class="docutils literal"><span class="pre">arena</span></tt> is the arena to which the generation chain will belong.</p>
<p><tt class="docutils literal"><span class="pre">gen_count</span></tt> is the number of <a class="reference internal" href="../glossary/g.html#term-generation"><em class="xref std std-term">generations</em></a> in
the chain.</p>
<p><tt class="docutils literal"><span class="pre">gen_params</span></tt> points to an array describing the generations.</p>
<p>Returns <a class="reference internal" href="error.html#MPS_RES_OK" title="MPS_RES_OK"><tt class="xref c c-macro docutils literal"><span class="pre">MPS_RES_OK</span></tt></a> if the generation chain is created
successfully, or another <a class="reference internal" href="../glossary/r.html#term-result-code"><em class="xref std std-term">result code</em></a> if it fails.</p>
<p>The generation chain persists until it is destroyed by calling
<a class="reference internal" href="#mps_chain_destroy" title="mps_chain_destroy"><tt class="xref c c-func docutils literal"><span class="pre">mps_chain_destroy()</span></tt></a>.</p>
</dd></dl>
<dl class="function">
<dt id="mps_chain_destroy">
void <tt class="descname">mps_chain_destroy</tt><big>(</big><a class="reference internal" href="#mps_chain_t" title="mps_chain_t">mps_chain_t</a><em>&nbsp;chain</em><big>)</big><a class="headerlink" href="#mps_chain_destroy" title="Permalink to this definition"></a></dt>
<dd><p>Destroy a <a class="reference internal" href="../glossary/g.html#term-generation-chain"><em class="xref std std-term">generation chain</em></a>.</p>
<p><tt class="docutils literal"><span class="pre">chain</span></tt> is the generation chain.</p>
<p>It is an error to destroy a generation chain if there exists a
<a class="reference internal" href="../glossary/p.html#term-pool"><em class="xref std std-term">pool</em></a> using the chain. The pool must be destroyed first.</p>
</dd></dl>
</div>
<div class="section" id="scheduling-of-collections">
<span id="topic-collection-schedule"></span><span id="index-2"></span><h2>11.2. Scheduling of collections<a class="headerlink" href="#scheduling-of-collections" title="Permalink to this headline"></a></h2>
<div class="admonition-note admonition">
<p class="first admonition-title">Note</p>
<p class="last">It&#8217;s likely that the algorithm the MPS uses to schedule its
collections will change in future releases. There&#8217;s a lot of room
for improvement here.</p>
</div>
<p>The <em class="dfn">new size</em> of a generation is the total size of the newly
allocated (in generation 0) or newly promoted (in other generations)
blocks in that generation. These are the blocks that have not been
<a class="reference internal" href="../glossary/c.html#term-condemned-set"><em class="xref std std-term">condemned</em></a> since they were allocated or
promoted into this generation. In pools like <a class="reference internal" href="../pool/amc.html#pool-amc"><em>AMC (Automatic Mostly-Copying)</em></a> where the
survivors get promoted to the next generation in the chain, the <em>new
size</em> of each generation (other than the topmost) is the same as its
total size, but in pools like <a class="reference internal" href="../pool/ams.html#pool-ams"><em>AMS (Automatic Mark and Sweep)</em></a> where survivors do not
get promoted, the two sizes can be different.</p>
<p>The first generation in a pool&#8217;s chain is the <a class="reference internal" href="../glossary/n.html#term-nursery-space"><em class="xref std std-term">nursery space</em></a>.
When the nursery&#8217;s <em>new size</em> exceeds its capacity, the MPS considers
collecting the pool. (How long it takes to get around to it depends on
which other collections on other pools are in progress.)</p>
<div class="admonition-note admonition">
<p class="first admonition-title">Note</p>
<p class="last">You can affect the decision as to when to collect the nursery
space by using the <a class="reference internal" href="pattern.html#topic-pattern-ramp"><em>ramp allocation pattern</em></a>.</p>
</div>
<p>If the MPS decides to collect a pool at all, all generations are
collected below the first generation whose <em>new size</em> is less than its
capacity.</p>
<p>In pools such as <a class="reference internal" href="../pool/amc.html#pool-amc"><em>AMC (Automatic Mostly-Copying)</em></a>, blocks in generation <em>g</em> that
survive collection get promoted to generation <em>g</em>+1. If the last
generation in the chain is collected, the survivors are promoted into
an <a class="reference internal" href="../glossary/a.html#term-arena"><em class="xref std std-term">arena</em></a>-wide &#8220;top&#8221; generation.</p>
<p>The predicted mortality is used to estimate how long the collection
will take, and this is used in turn to decide how much work the
collector will do each time it has an opportunity to do some work. The constraints here are:</p>
<ol class="arabic simple">
<li>The <a class="reference internal" href="../glossary/c.html#term-client-program"><em class="xref std std-term">client program</em></a> might have specified a limit on the
acceptable length of the pause if the work is being done inside
<a class="reference internal" href="arena.html#mps_arena_step" title="mps_arena_step"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_step()</span></tt></a>.</li>
<li>The collector needs to keep up with the <a class="reference internal" href="../glossary/c.html#term-client-program"><em class="xref std std-term">client program</em></a>:
that is, it has to collect garbage at least as fast as the client
is producing it, otherwise the amount of garbage will grow without
bound.</li>
</ol>
<p>With perfect prediction, the collector&#8217;s work should be smoothly
distributed, with a small maximum pause time. Getting the predicted
mortality wrong leads to &#8220;lumpy&#8221; distribution of collection work with
a longer maximum pause time. If the predicted mortality is too high,
the collector will start out by taking small time slices and then find
that it has to catch up later by taking larger time slices. If the
predicted mortality is too low, the collector will take larger time
slices up front and then find that it is idle later on.</p>
</div>
<div class="section" id="garbage-collection-start-messages">
<span id="index-3"></span><h2>11.3. Garbage collection start messages<a class="headerlink" href="#garbage-collection-start-messages" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="mps_message_type_gc_start">
<a class="reference internal" href="message.html#mps_message_type_t" title="mps_message_type_t">mps_message_type_t</a> <tt class="descname">mps_message_type_gc_start</tt><big>(</big>void<big>)</big><a class="headerlink" href="#mps_message_type_gc_start" title="Permalink to this definition"></a></dt>
<dd><p>Return the <a class="reference internal" href="../glossary/m.html#term-message-type"><em class="xref std std-term">message type</em></a> of garbage collection start
messages.</p>
<p>Garbage collection start messages contain information about why
the <a class="reference internal" href="../glossary/g.html#term-garbage-collection"><em class="xref std std-term">garbage collection</em></a> started.</p>
<p>The access method specific to a <a class="reference internal" href="../glossary/m.html#term-message"><em class="xref std std-term">message</em></a> of this message
type is:</p>
<ul class="simple">
<li><a class="reference internal" href="#mps_message_gc_start_why" title="mps_message_gc_start_why"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_gc_start_why()</span></tt></a> returns a string that
describes why the garbage collection started.</li>
</ul>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="mps_message_gc_start_why">
const char *<tt class="descname">mps_message_gc_start_why</tt><big>(</big><a class="reference internal" href="arena.html#mps_arena_t" title="mps_arena_t">mps_arena_t</a><em>&nbsp;arena</em>, <a class="reference internal" href="message.html#mps_message_t" title="mps_message_t">mps_message_t</a><em>&nbsp;message</em><big>)</big><a class="headerlink" href="#mps_message_gc_start_why" title="Permalink to this definition"></a></dt>
<dd><p>Return a string that describes why the <a class="reference internal" href="../glossary/g.html#term-garbage-collection"><em class="xref std std-term">garbage collection</em></a>
that posted a <a class="reference internal" href="../glossary/m.html#term-message"><em class="xref std std-term">message</em></a> started.</p>
<p><tt class="docutils literal"><span class="pre">arena</span></tt> is the arena which posted the message.</p>
<p><tt class="docutils literal"><span class="pre">message</span></tt> is a message retrieved by <a class="reference internal" href="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> and
not yet discarded. It must be a garbage collection message: see
<a class="reference internal" href="#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>.</p>
<p>Returns a pointer to a string that is describes (in English) why
this collection started. The contents of the string must not be
modified by the client. The string and the pointer are valid until
the message is discarded with <a class="reference internal" href="message.html#mps_message_discard" title="mps_message_discard"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_discard()</span></tt></a>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd></dl>
</div>
<div class="section" id="garbage-collection-messages">
<span id="index-4"></span><h2>11.4. Garbage collection messages<a class="headerlink" href="#garbage-collection-messages" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="mps_message_type_gc">
<a class="reference internal" href="message.html#mps_message_type_t" title="mps_message_type_t">mps_message_type_t</a> <tt class="descname">mps_message_type_gc</tt><big>(</big>void<big>)</big><a class="headerlink" href="#mps_message_type_gc" title="Permalink to this definition"></a></dt>
<dd><p>Return the <a class="reference internal" href="../glossary/m.html#term-message-type"><em class="xref std std-term">message type</em></a> of garbage collection statistic
messages.</p>
<p>Garbage collection statistic messages are used by the MPS to give
the <a class="reference internal" href="../glossary/c.html#term-client-program"><em class="xref std std-term">client program</em></a> information about a <a class="reference internal" href="../glossary/g.html#term-garbage-collection"><em class="xref std std-term">garbage
collection</em></a> that has taken place. Such information may be useful in
analysing the client program&#8217;s memory usage over time.</p>
<p>The access methods specific to a message of this type are:</p>
<ul class="simple">
<li><a class="reference internal" href="#mps_message_gc_live_size" title="mps_message_gc_live_size"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_gc_live_size()</span></tt></a> returns the total size of the
<a class="reference internal" href="../glossary/c.html#term-condemned-set"><em class="xref std std-term">condemned set</em></a> that survived the garbage collection that
generated the message;</li>
<li><a class="reference internal" href="#mps_message_gc_condemned_size" title="mps_message_gc_condemned_size"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_gc_condemned_size()</span></tt></a> returns the approximate
size of <a class="reference internal" href="../glossary/c.html#term-condemned-set"><em class="xref std std-term">condemned set</em></a> in the garbage collection that
generated the message;</li>
<li><a class="reference internal" href="#mps_message_gc_not_condemned_size" title="mps_message_gc_not_condemned_size"><tt class="xref c c-func docutils literal"><span class="pre">mps_message_gc_not_condemned_size()</span></tt></a> returns the
approximate size of the set of objects that were in collected
<a class="reference internal" href="../glossary/p.html#term-pool"><em class="xref std std-term">pools</em></a>, but were not condemned in the garbage
collection that generated the message.</li>
</ul>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="mps_message_gc_condemned_size">
size_t <tt class="descname">mps_message_gc_condemned_size</tt><big>(</big><a class="reference internal" href="arena.html#mps_arena_t" title="mps_arena_t">mps_arena_t</a><em>&nbsp;arena</em>, <a class="reference internal" href="message.html#mps_message_t" title="mps_message_t">mps_message_t</a><em>&nbsp;message</em><big>)</big><a class="headerlink" href="#mps_message_gc_condemned_size" title="Permalink to this definition"></a></dt>
<dd><p>Return the &#8220;condemned size&#8221; property of a <a class="reference internal" href="../glossary/m.html#term-message"><em class="xref std std-term">message</em></a>.</p>
<p><tt class="docutils literal"><span class="pre">arena</span></tt> is the arena which posted the message.</p>
<p><tt class="docutils literal"><span class="pre">message</span></tt> is a message retrieved by <a class="reference internal" href="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> and
not yet discarded. It must be a garbage collection message: see
<a class="reference internal" href="#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>.</p>
<p>The &#8220;condemned size&#8221; property is the approximate <a class="reference internal" href="../glossary/s.html#term-size"><em class="xref std std-term">size</em></a> of
the <a class="reference internal" href="../glossary/c.html#term-condemned-set"><em class="xref std std-term">condemned set</em></a> in the <a class="reference internal" href="../glossary/g.html#term-garbage-collection"><em class="xref std std-term">garbage collection</em></a> that
generated the message.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="mps_message_gc_live_size">
size_t <tt class="descname">mps_message_gc_live_size</tt><big>(</big><a class="reference internal" href="arena.html#mps_arena_t" title="mps_arena_t">mps_arena_t</a><em>&nbsp;arena</em>, <a class="reference internal" href="message.html#mps_message_t" title="mps_message_t">mps_message_t</a><em>&nbsp;message</em><big>)</big><a class="headerlink" href="#mps_message_gc_live_size" title="Permalink to this definition"></a></dt>
<dd><p>Return the &#8220;live size&#8221; property of a <a class="reference internal" href="../glossary/m.html#term-message"><em class="xref std std-term">message</em></a>.</p>
<p><tt class="docutils literal"><span class="pre">arena</span></tt> is the arena which posted the message.</p>
<p><tt class="docutils literal"><span class="pre">message</span></tt> is a message retrieved by <a class="reference internal" href="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> and
not yet discarded. It must be a garbage collection message: see
<a class="reference internal" href="#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>.</p>
<p>The &#8220;live size&#8221; property is the total size of the set of objects
that survived the <a class="reference internal" href="../glossary/g.html#term-garbage-collection"><em class="xref std std-term">garbage collection</em></a> that generated the
message.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="mps_message_gc_not_condemned_size">
size_t <tt class="descname">mps_message_gc_not_condemned_size</tt><big>(</big><a class="reference internal" href="arena.html#mps_arena_t" title="mps_arena_t">mps_arena_t</a><em>&nbsp;arena</em>, <a class="reference internal" href="message.html#mps_message_t" title="mps_message_t">mps_message_t</a><em>&nbsp;message</em><big>)</big><a class="headerlink" href="#mps_message_gc_not_condemned_size" title="Permalink to this definition"></a></dt>
<dd><p>Return the &#8220;not condemned size&#8221; property of a <a class="reference internal" href="../glossary/m.html#term-message"><em class="xref std std-term">message</em></a>.</p>
<p><tt class="docutils literal"><span class="pre">arena</span></tt> is the arena which posted the message.</p>
<p><tt class="docutils literal"><span class="pre">message</span></tt> is a message retrieved by <a class="reference internal" href="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> and
not yet discarded. It must be a garbage collection message: see
<a class="reference internal" href="#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>.</p>
<p>The &#8220;not condemned size&#8221; property is the approximate size of the
set of objects that were in collected <a class="reference internal" href="../glossary/p.html#term-pool"><em class="xref std std-term">pools</em></a>, but
were not in the <a class="reference internal" href="../glossary/c.html#term-condemned-set"><em class="xref std std-term">condemned set</em></a> in the <a class="reference internal" href="../glossary/g.html#term-garbage-collection"><em class="xref std std-term">garbage
collection</em></a> that generated the message.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="message.html#topic-message"><em>Messages</em></a>.</p>
</div>
</dd></dl>
</div>
</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>
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">11. Garbage collection</a><ul>
<li><a class="reference internal" href="#generation-chains">11.1. Generation chains</a></li>
<li><a class="reference internal" href="#scheduling-of-collections">11.2. Scheduling of collections</a></li>
<li><a class="reference internal" href="#garbage-collection-start-messages">11.3. Garbage collection start messages</a></li>
<li><a class="reference internal" href="#garbage-collection-messages">11.4. Garbage collection messages</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="root.html"
title="previous chapter">10. Roots</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="message.html"
title="next chapter">12. Messages</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="message.html" title="12. Messages"
>next</a> |</li>
<li class="right" >
<a href="root.html" title="10. Roots"
>previous</a> |</li>
<li><a href="../index.html">Memory Pool System 1.111.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Reference</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>