mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-26 07:00:35 -08:00
1032 lines
No EOL
79 KiB
HTML
1032 lines
No EOL
79 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>To do — 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="prev" title="Contact us" href="contact.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="contact.html" title="Contact us"
|
|
accesskey="P">previous</a> |</li>
|
|
<li><a href="index.html">Memory Pool System 1.111.0 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="to-do">
|
|
<h1>To do<a class="headerlink" href="#to-do" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="outstanding">
|
|
<h2>Outstanding<a class="headerlink" href="#outstanding" title="Permalink to this headline">¶</a></h2>
|
|
<ol class="arabic simple" start="3">
|
|
<li>Glossary entries need permalink markers. See Sphinx <a class="reference external" href="https://bitbucket.org/birkenfeld/sphinx/issue/996/expose-glossary-entry-link-on-hover">issue 996</a>.</li>
|
|
</ol>
|
|
<ol class="arabic simple" start="5">
|
|
<li>Fix the <a class="reference internal" href="genindex.html"><em>Index</em></a> so that glossary entries like “byte (2)”
|
|
aren’t interpreted as subentries? (Or is it OK as is?)</li>
|
|
</ol>
|
|
<ol class="arabic simple" start="9">
|
|
<li>Hyphenate long function names across line endings. It would be
|
|
possible to do this by inserting soft hyphens but if you copied
|
|
the function name you’d copy the soft hyphens too.</li>
|
|
</ol>
|
|
<ol class="arabic simple" start="11">
|
|
<li>Support MMREF-style anchors to the glossary (<tt class="docutils literal"><span class="pre">#garbage.collection</span></tt>
|
|
as well as <tt class="docutils literal"><span class="pre">#garbage-collection</span></tt>).</li>
|
|
</ol>
|
|
<ol class="arabic" start="37">
|
|
<li><p class="first">Need a <tt class="docutils literal"><span class="pre">scheme-advanced.c</span></tt> to illustrate advanced topics:</p>
|
|
<ul class="simple">
|
|
<li>Segregate objects into multiple pools (e.g. strings and integers
|
|
into <a class="reference internal" href="pool/amcz.html#pool-amcz"><em>AMCZ (Automatic Mostly-Copying Zero-rank)</em></a>). [DONE]</li>
|
|
<li>Global symbol table under MPS management. [DONE]</li>
|
|
<li>Tagged references.</li>
|
|
<li>Unboxed values.</li>
|
|
<li>“Bumming cycles out of scan” using tags.</li>
|
|
<li>Weak hashtable. [DONE]</li>
|
|
</ul>
|
|
<p>Compare the performance with the plain <tt class="docutils literal"><span class="pre">scheme.c</span></tt>. The advanced
|
|
version better be faster!</p>
|
|
</li>
|
|
</ol>
|
|
<ol class="arabic simple" start="76">
|
|
<li>Develop debugging examples that illustrate each of the warnings
|
|
about consistency. Also to demonstrate the “garbage collect
|
|
frequently to expose errors as soon as possible” advice.</li>
|
|
</ol>
|
|
<ol class="arabic" start="124">
|
|
<li><p class="first">In <a class="reference internal" href="guide/debug.html#guide-debug"><em>Debugging with the Memory Pool System</em></a>, we need to talk about other debuggers.</p>
|
|
<p>In particular, you can’t really work with the MPS with LLDB on
|
|
the Mac yet. Apple knows about this.</p>
|
|
<p>There are a couple of magic commands to type when using WinDbg to
|
|
get it to pass exceptions. We should document those and things
|
|
that need doing with Visual Studio.</p>
|
|
</li>
|
|
<li><p class="first">Need overview for people who already know about garbage
|
|
collection. (RB needs to write this.)</p>
|
|
</li>
|
|
<li><p class="first">Things that are “within reach”, i.e. that we could do if people
|
|
needed them. (RB needs to write this.)</p>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
<div class="section" id="complete">
|
|
<h2>Complete<a class="headerlink" href="#complete" title="Permalink to this headline">¶</a></h2>
|
|
<ol class="arabic">
|
|
<li><p class="first">Create a new <a class="reference external" href="http://sphinx.pocoo.org/ext/appapi.html#sphinx.domains.Domain">domain</a> for MPS stuff.</p>
|
|
</li>
|
|
<li><p class="first">Create new types of Sphinx objects for pools and topics.</p>
|
|
<p><em>Action:</em> doesn’t seem necessary. Ordinary cross-references work fine.</p>
|
|
</li>
|
|
</ol>
|
|
<ol class="arabic simple" start="4">
|
|
<li>Make “(1)”, “(2)” into superscripts.</li>
|
|
</ol>
|
|
<ol class="arabic" start="6">
|
|
<li><p class="first">Identify <tt class="docutils literal"><span class="pre">:term:</span></tt> references that point to “see” cross-references.</p>
|
|
</li>
|
|
<li><p class="first">Re-do the diagrams in vector form and using the colour palette.</p>
|
|
</li>
|
|
<li><p class="first">Use a better bibliography extension and update the bibliography.
|
|
See for example <a class="reference external" href="http://wnielson.bitbucket.org/projects/sphinx-natbib/">sphinx-natbib</a>.</p>
|
|
<p>I tried downloading and using this but it’s clearly not ready yet.
|
|
It uses Pybtex to parse BibTeX, but Pybtex is buggy (its
|
|
<tt class="docutils literal"><span class="pre">CaseInsensitiveDict</span></tt> class can’t be serialized).</p>
|
|
<p>We could do this “by hand” as it were by using normal Sphinx
|
|
cross-references. For example:</p>
|
|
<div class="highlight-c"><div class="highlight"><pre><span class="o">*</span> <span class="p">..</span> <span class="n">_WIL95</span><span class="o">:</span>
|
|
|
|
<span class="n">Paul</span> <span class="n">R</span><span class="p">.</span> <span class="n">Wilson</span><span class="p">,</span> <span class="n">Mark</span> <span class="n">S</span><span class="p">.</span> <span class="n">Johnstone</span><span class="p">,</span> <span class="n">Michael</span> <span class="n">Neely</span><span class="p">,</span> <span class="n">David</span>
|
|
<span class="n">Boles</span><span class="p">.</span> <span class="mf">1995.</span> <span class="s">"Dynamic Storage Allocation: A Survey and</span>
|
|
<span class="n">Critical</span> <span class="n">Review</span><span class="s">".</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
<ol class="arabic simple" start="10">
|
|
<li>Pluralize “Topic” to “Topics” and so on.</li>
|
|
</ol>
|
|
<ol class="arabic" start="12">
|
|
<li><p class="first">Superscripts in aka sections.</p>
|
|
</li>
|
|
<li><p class="first">Does the object format description (<a class="reference internal" href="topic/format.html#mps_fmt_A_s" title="mps_fmt_A_s"><tt class="xref c c-type docutils literal"><span class="pre">mps_fmt_A_s</span></tt></a> and so
|
|
on) have to be static as in the Scheme example? Or is it OK to
|
|
throw it away after calling <tt class="xref c c-func docutils literal"><span class="pre">mps_fmt_create()</span></tt>?</p>
|
|
<p>Same question for the generation structure
|
|
(<a class="reference internal" href="topic/collection.html#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>) for a pool and the size classes
|
|
(<a class="reference internal" href="topic/cache.html#mps_sac_class_s" title="mps_sac_class_s"><tt class="xref c c-type docutils literal"><span class="pre">mps_sac_class_s</span></tt></a>) for a segregated allocation cache?</p>
|
|
<p><em>Answer:</em> examination of the code shows that all of these structures
|
|
are copied into internally allocated MPS control structures, and
|
|
so it is OK for the client program to put these structures on the
|
|
stack otherwise dispose of them.</p>
|
|
</li>
|
|
<li><p class="first">What is the difference, if any, between <a class="reference internal" href="topic/interface.html#mps_word_t" title="mps_word_t"><tt class="xref c c-type docutils literal"><span class="pre">mps_word_t</span></tt></a> and
|
|
<a class="reference internal" href="topic/platform.html#MPS_T_WORD" title="MPS_T_WORD"><tt class="xref c c-macro docutils literal"><span class="pre">MPS_T_WORD</span></tt></a>?</p>
|
|
<p><em>Answer:</em> <a class="reference internal" href="topic/platform.html#MPS_T_WORD" title="MPS_T_WORD"><tt class="xref c c-macro docutils literal"><span class="pre">MPS_T_WORD</span></tt></a> comes from <tt class="docutils literal"><span class="pre">mpstd.h</span></tt> which
|
|
contains no C code (only macro definitions). It used to be the
|
|
case that <tt class="docutils literal"><span class="pre">mpstd.h</span></tt> was included in <tt class="docutils literal"><span class="pre">mps.h</span></tt> but it isn’t any
|
|
more? There’s something to do here: why don’t we include it?
|
|
Because <tt class="docutils literal"><span class="pre">mpstd.h</span></tt> is a bit picky and could easily be
|
|
broken. <a class="reference internal" href="topic/platform.html#MPS_T_WORD" title="MPS_T_WORD"><tt class="xref c c-macro docutils literal"><span class="pre">MPS_T_WORD</span></tt></a> could be eliminated from the
|
|
external interface.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003315/">job003315</a>.</p>
|
|
</li>
|
|
<li><p class="first">How can I explain why the Scheme example uses
|
|
<tt class="docutils literal"><span class="pre">sizeof(mps_word_t)</span></tt> as its alignment? Why not
|
|
<a class="reference internal" href="topic/platform.html#MPS_PF_ALIGN" title="MPS_PF_ALIGN"><tt class="xref c c-macro docutils literal"><span class="pre">MPS_PF_ALIGN</span></tt></a> (or are client programs not supposed to
|
|
look at <tt class="docutils literal"><span class="pre">mpstd.h</span></tt>)? Why not something of its own manufacture, like
|
|
<tt class="docutils literal"><span class="pre">sizeof(union</span> <span class="pre">{long,</span> <span class="pre">size_t,</span> <span class="pre">void*})</span></tt>?</p>
|
|
<p><em>Answer:</em> This a puzzle! More thought needed.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003316/">job003316</a>.</p>
|
|
</li>
|
|
<li><p class="first">Why does the Scheme example have a copy method in its object
|
|
format when the reference manual says it’s obsolete?</p>
|
|
<p><em>Answer:</em> It wasn’t obsolete when it was written. I removed it.</p>
|
|
</li>
|
|
<li><p class="first">What is the difference between the “event stream” and the
|
|
“telemetry stream”? Are these names for the same thing? Or is
|
|
there a distinction (for example, “event stream” refers to the
|
|
internal, unfiltered, stream of events and “telemetry stream”
|
|
refers to the filtered stream)?</p>
|
|
<p><em>Answer:</em> the event stream is the implementation of the telemetry
|
|
stream, so the user doc can refer to “telemetry stream”.</p>
|
|
</li>
|
|
<li><p class="first">The location dependency functions all take an arena as an
|
|
argument. What is the role of this argument?</p>
|
|
<p><em>Answer:</em> if you have multiple arenas, you are going to have to
|
|
have an <a class="reference internal" href="topic/location.html#mps_ld_t" title="mps_ld_t"><tt class="xref c c-type docutils literal"><span class="pre">mps_ld_t</span></tt></a> for each arena, and add each address
|
|
you are interested in for each arena. (If you happen to know which
|
|
arena it’s in, you can just specify it for that arena.) So for
|
|
isstale, it better be the same arena as add.</p>
|
|
</li>
|
|
<li><p class="first">What is the role of the third (<tt class="docutils literal"><span class="pre">addr</span></tt>) argument to
|
|
<a class="reference internal" href="topic/location.html#mps_ld_isstale" title="mps_ld_isstale"><tt class="xref c c-func docutils literal"><span class="pre">mps_ld_isstale()</span></tt></a>? <tt class="docutils literal"><span class="pre">LDIsStale</span></tt> says <tt class="docutils literal"><span class="pre">UNUSED(addr);</span></tt> so
|
|
maybe it is unused.</p>
|
|
<p><em>Answer:</em> in theory it’s the address you want to check, but in the
|
|
implementation it tells you for all addresses. The LD functions
|
|
have an intention that is not quite the same as the design
|
|
documentation. (But what then, asks RB, is the point of
|
|
<a class="reference internal" href="topic/location.html#mps_ld_add" title="mps_ld_add"><tt class="xref c c-func docutils literal"><span class="pre">mps_ld_add()</span></tt></a>?) Perhaps in the case of
|
|
<a class="reference internal" href="topic/location.html#mps_ld_isstale" title="mps_ld_isstale"><tt class="xref c c-func docutils literal"><span class="pre">mps_ld_isstale()</span></tt></a> it’s “a piece of information that might
|
|
be useful for debugging”.</p>
|
|
</li>
|
|
<li><p class="first">Is the material in the pool class comparison table at all accurate?</p>
|
|
<p><em>Answer:</em> It will be better to have a flowchart approach rather than
|
|
a table of properties.</p>
|
|
</li>
|
|
<li><p class="first">This code seems a bit confused about what to do:</p>
|
|
<div class="highlight-c"><div class="highlight"><pre><span class="n">assert</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
|
|
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Unexpected object on the heap</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
|
|
<span class="n">abort</span><span class="p">();</span>
|
|
<span class="k">return</span> <span class="n">MPS_RES_FAIL</span><span class="p">;</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>What should it say?</p>
|
|
<p><em>Answer:</em> the assertion and the return seem to be bogus, so I
|
|
removed them.</p>
|
|
</li>
|
|
<li><p class="first">How does fixing interact with tagged references? Do I need to
|
|
remove the tag before fixing a reference? Do I need to restore the
|
|
tag afterwards? I thought that both would be necessary but the
|
|
<a class="reference external" href="https://info.ravenbrook.com/project/mps/master/design/critical-path.txt">critical path</a> documentation has an example from OpenDylan with
|
|
tagged references that does neither:</p>
|
|
<p><em>Answer:</em> we’ll document that all references need to be
|
|
decrypted/de-tagged. There ought to be some slack in practice but
|
|
it needs thought.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003317/">job003317</a>.</p>
|
|
</li>
|
|
<li><p class="first">This code from <tt class="docutils literal"><span class="pre">mps_chat</span></tt> in the Scheme example is wrong:</p>
|
|
<div class="highlight-c"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">type</span> <span class="o">==</span> <span class="n">mps_message_type_gc_start</span><span class="p">())</span> <span class="p">{</span>
|
|
<span class="n">printf</span><span class="p">(</span><span class="s">"Collection %lu started.</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="kt">long</span><span class="p">)</span><span class="n">mps_collections</span><span class="p">(</span><span class="n">arena</span><span class="p">));</span>
|
|
</pre></div>
|
|
</div>
|
|
<p><a class="reference internal" href="topic/arena.html#mps_collections" title="mps_collections"><tt class="xref c c-func docutils literal"><span class="pre">mps_collections()</span></tt></a> returns the total number of collections
|
|
to date, not the number of the collection that posted the
|
|
message. This means that if there have been multiple collections
|
|
since the last time the message queue was emptied, the output will
|
|
look like this:</p>
|
|
<div class="highlight-c"><div class="highlight"><pre><span class="n">Collection</span> <span class="mi">47</span> <span class="n">started</span><span class="p">.</span>
|
|
<span class="p">...</span>
|
|
<span class="n">Collection</span> <span class="mi">47</span> <span class="n">started</span><span class="p">.</span>
|
|
<span class="p">...</span>
|
|
<span class="n">Collection</span> <span class="mi">47</span> <span class="n">started</span><span class="p">.</span>
|
|
<span class="p">...</span>
|
|
</pre></div>
|
|
</div>
|
|
<p><em>Answer:</em> mis-feature. Update the scheme example.</p>
|
|
<p><em>Action:</em> updated the Scheme example. Made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003318/">job003318</a>.</p>
|
|
</li>
|
|
<li><p class="first">It seems “tricky” to re-use fowarding objects as padding objects
|
|
by setting their forwarding pointer to <tt class="docutils literal"><span class="pre">NULL</span></tt>. Wouldn’t it be
|
|
simpler to explain if we had <tt class="docutils literal"><span class="pre">TYPE_PAD</span></tt> for multiple-word
|
|
padding objects? Things are difficult enough to explain as it is!</p>
|
|
<p><em>Answer:</em> It would be simpler, so I made this change.</p>
|
|
</li>
|
|
<li><p class="first">The Scheme example says, “Adapting it to use the MPS took
|
|
approximately two hours”. I doubt this would be the common case,
|
|
and it would be better to under-promise here and over-deliver.</p>
|
|
<p><em>Answer:</em> take it out.</p>
|
|
</li>
|
|
<li><p class="first">I need to document the values in <a class="reference internal" href="topic/collection.html#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>. I
|
|
believe they are the capacity (size of the generation in
|
|
kilobytes) and the mortality (the proportion of objects in this
|
|
generation that are expected to die in a collection). But what do
|
|
they mean to the MPS? And how should one go about choosing values?</p>
|
|
<p><em>Answer:</em> requires a whole document. Talk to RB. The intro
|
|
document should say, “take these values on trust”. There’s a
|
|
design document about this based on the <a class="reference external" href="https://info.ravenbrook.com/project/mps/doc/2002-06-18/obsolete-mminfo/mminfo/strategy/lisp-machine/">Lisp Machine</a>.</p>
|
|
</li>
|
|
<li><p class="first">Wouldn’t it make <a class="reference internal" href="pool/amc.html#mps_amc_apply" title="mps_amc_apply"><tt class="xref c c-func docutils literal"><span class="pre">mps_amc_apply()</span></tt></a> easier to document if
|
|
there were a typedef for the stepper function type, something like
|
|
this:</p>
|
|
<div class="highlight-c"><div class="highlight"><pre><span class="k">typedef</span> <span class="kt">void</span> <span class="p">(</span><span class="o">*</span><span class="n">mps_amc_apply_stepper_t</span><span class="p">)(</span><span class="n">mps_addr_t</span> <span class="n">object</span><span class="p">,</span> <span class="kt">void</span> <span class="o">*</span><span class="n">p</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">s</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p><em>Answer:</em> RB says I can make this change since it’s
|
|
backwards-compatible.</p>
|
|
</li>
|
|
<li><p class="first">Wouldn’t the Scheme example be better without TAB characters?</p>
|
|
<p><em>Answer:</em> maybe, but it would lead to merge conflicts. So no change.</p>
|
|
</li>
|
|
<li><p class="first">The example code looks better (easier to see the structure) if I
|
|
use an indentation of four spaces. There are also cases where the
|
|
original code is inconsistent (compare the indentation of the case
|
|
labels in <tt class="docutils literal"><span class="pre">print</span></tt> versus <tt class="docutils literal"><span class="pre">obj_scan</span></tt>). I’ve made these consistent
|
|
in the user guide.</p>
|
|
<p>Should these changes be propagated back to the example code?</p>
|
|
<p><em>Answer:</em> no.</p>
|
|
</li>
|
|
<li><p class="first">The Scheme example is inconsistent in its use of whitespace: for
|
|
example sometimes there’s a space after <tt class="docutils literal"><span class="pre">if</span></tt> and sometimes not.</p>
|
|
<p><em>Answer:</em> maybe so, but it would lead to merge conflicts. So no
|
|
change.</p>
|
|
</li>
|
|
<li><p class="first">What is a root mode and how do I explain it?</p>
|
|
<p><em>Answer:</em> currently a root mode has no effect. It tells the MPS
|
|
whether it’s OK for the MPS to put a barrier on the
|
|
root. Recommend pass zero. For future expansion.</p>
|
|
</li>
|
|
<li><p class="first">You create a marker on the stack and pass it to
|
|
<a class="reference internal" href="topic/root.html#mps_root_create_reg" title="mps_root_create_reg"><tt class="xref c c-func docutils literal"><span class="pre">mps_root_create_reg()</span></tt></a> to tell it where the bottom of the
|
|
stack is. Fine. But then you are supposed to call your program
|
|
via <a class="reference internal" href="topic/thread.html#mps_tramp" title="mps_tramp"><tt class="xref c c-func docutils literal"><span class="pre">mps_tramp()</span></tt></a>. If the MPS is trampolining your whole
|
|
program, why does the MPS need your help to work out where the
|
|
stack is? It could work it out for itself surely?</p>
|
|
<p>I guess this is some kind of separation of concerns –
|
|
<a class="reference internal" href="topic/thread.html#mps_tramp" title="mps_tramp"><tt class="xref c c-func docutils literal"><span class="pre">mps_tramp()</span></tt></a> is something to do with protection – but it’s
|
|
hard for me to explain.</p>
|
|
<p><em>Answer:</em> <a class="reference internal" href="topic/thread.html#mps_tramp" title="mps_tramp"><tt class="xref c c-func docutils literal"><span class="pre">mps_tramp()</span></tt></a> is needed for your program to work
|
|
on Windows because a barrier hit generates a Structured Exception
|
|
which has to be caught by a handler higher up the stack.</p>
|
|
</li>
|
|
<li><p class="first">Status. At what point will the work be “good enough” to merge back
|
|
to the master sources?</p>
|
|
<p><em>Answer:</em> After RB reviews it.</p>
|
|
</li>
|
|
<li><p class="first">The generic example of using <a class="reference internal" href="topic/thread.html#mps_tramp" title="mps_tramp"><tt class="xref c c-func docutils literal"><span class="pre">mps_tramp()</span></tt></a> needs to pass
|
|
<tt class="docutils literal"><span class="pre">argv</span></tt> and <tt class="docutils literal"><span class="pre">argc</span></tt>, and return an exit code, so maybe it would
|
|
make sense to do that in the Scheme example, even though Scheme
|
|
doesn’t use these parameters.</p>
|
|
<p><em>Answer:</em> no.</p>
|
|
</li>
|
|
<li><p class="first">There’s a lot of stuff to explain here, and I think some of it
|
|
could be simplified:</p>
|
|
<ol class="loweralpha simple">
|
|
<li>The common trampoline case (passing <tt class="docutils literal"><span class="pre">argv</span></tt> and <tt class="docutils literal"><span class="pre">argc</span></tt>, and
|
|
returning an exit code).</li>
|
|
<li>The common single-thread root registration case (e.g. putting a
|
|
marker on the stack in <a class="reference internal" href="topic/thread.html#mps_tramp" title="mps_tramp"><tt class="xref c c-func docutils literal"><span class="pre">mps_tramp()</span></tt></a>).</li>
|
|
</ol>
|
|
<p><em>Answer:</em> leave it as it is.</p>
|
|
</li>
|
|
<li><p class="first">The discussion in the Scheme example about <a class="reference internal" href="topic/allocation.html#mps_reserve" title="mps_reserve"><tt class="xref c c-func docutils literal"><span class="pre">mps_reserve()</span></tt></a>
|
|
suggests that <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> doesn’t require aligned
|
|
sizes. Is that right? Needs to be added to <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>
|
|
reference if so.</p>
|
|
<p><em>Answer:</em> in fact there’s no rule about this. Depends on the pool
|
|
class. “It doesn’t unless the pool class says it does”.</p>
|
|
</li>
|
|
</ol>
|
|
<ol class="arabic" start="38">
|
|
<li><p class="first">Document about interface conventions and interface policies. What
|
|
do we guarantee about support for the external symbols?</p>
|
|
<p><em>Action:</em> added new topic <a class="reference internal" href="topic/interface.html#topic-interface"><em>Interface conventions</em></a>.</p>
|
|
</li>
|
|
<li><p class="first">We don’t support scanning the stack/registers except via
|
|
mps_stack_scan_ambig? Document this?</p>
|
|
<p><em>Answer:</em> this is the only one we support at the moment.</p>
|
|
</li>
|
|
<li><p class="first">The <tt class="docutils literal"><span class="pre">fragmentation_limit</span></tt> argument to <a class="reference internal" href="pool/mvt.html#mps_class_mvt" title="mps_class_mvt"><tt class="xref c c-func docutils literal"><span class="pre">mps_class_mvt()</span></tt></a> is
|
|
an integer representing a percentage between 1 and 100. For
|
|
consistency with mps_gen_param_s this should be a double between 0
|
|
(exclusive) and 1. Can we change this?</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003319/">job003319</a>.</p>
|
|
</li>
|
|
<li><p class="first">Move symbol reference from <tt class="docutils literal"><span class="pre">mpsio.h</span></tt>, <tt class="docutils literal"><span class="pre">mpstd.h</span></tt> and
|
|
<tt class="docutils literal"><span class="pre">mpslib.h</span></tt> to <a class="reference internal" href="topic/plinth.html#topic-plinth"><em>Plinth</em></a>.</p>
|
|
</li>
|
|
<li><p class="first">Move symbol references for the pool classes to the corresponding
|
|
pool document.</p>
|
|
</li>
|
|
<li><p class="first">In the “choosing a pool” procedure there’s no mention of ambiguous
|
|
references. I omitted them because the NB/RIT chart of pool
|
|
properties seemed to suggest that no pools can contain ambiguous
|
|
references. But is this right? Couldn’t you allocate your block
|
|
containing ambiguous references in a non-moving, non-scanning pool
|
|
like MVT and register it as an ambiguous root?</p>
|
|
<p><em>Answer:</em> Ought to be a note to explain that there may more thing to
|
|
take into account for experts. “For beginners”. Ambiguous
|
|
references not currently supported via scanning/automatic pools
|
|
etc: use workaround.</p>
|
|
</li>
|
|
<li><p class="first">In the “choosing a pool” procedure there’s no mention of
|
|
protection. Can we subsume this under “moving”?</p>
|
|
<p><em>Answer:</em> Use “movable and protectable”.</p>
|
|
</li>
|
|
<li><p class="first">Does <a class="reference internal" href="topic/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> offer any guarantees about how long
|
|
it will pause for? (I presume not: I’ve written “makes every
|
|
effort to return within interval seconds, but does not guarantee
|
|
to do so”.)</p>
|
|
<p><em>Answer:</em> No guarantee. “Since it calls your scanning code...”</p>
|
|
</li>
|
|
<li><p class="first">RHSK’s documentation for <a class="reference internal" href="topic/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> says “Note that
|
|
<a class="reference internal" href="topic/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> will still step, even if the arena has
|
|
been clamped. This is to allow a client to advance a collection
|
|
only at these mps_arena_step points (but note that barrier hits
|
|
will also cause collection work).” However, looking at the
|
|
implementation, it seems to me that if <a class="reference internal" href="topic/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>
|
|
does anything, then it releases the arena. Is the client program
|
|
expected to call <a class="reference internal" href="topic/arena.html#mps_arena_clamp" title="mps_arena_clamp"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_clamp()</span></tt></a> after
|
|
<a class="reference internal" href="topic/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> returns, if they want to support this use
|
|
case?</p>
|
|
<p>Similar question if the arena is in the parked state.</p>
|
|
<p><em>Answer:</em> this is a bug.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003320/">job003320</a>.</p>
|
|
</li>
|
|
<li><p class="first">How does <a class="reference internal" href="topic/arena.html#mps_arena_start_collect" title="mps_arena_start_collect"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_start_collect()</span></tt></a> interact with the arena
|
|
state? (It seems from looking at the implementation that it puts
|
|
the arena into the unclamped state, like
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_release" title="mps_arena_release"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_release()</span></tt></a>.)</p>
|
|
<p><em>Answer:</em> this is fine.</p>
|
|
</li>
|
|
<li><p class="first">How do I explain the condition on <a class="reference internal" href="topic/pool.html#mps_addr_pool" title="mps_addr_pool"><tt class="xref c c-func docutils literal"><span class="pre">mps_addr_pool()</span></tt></a> and
|
|
<a class="reference internal" href="topic/format.html#mps_addr_fmt" title="mps_addr_fmt"><tt class="xref c c-func docutils literal"><span class="pre">mps_addr_fmt()</span></tt></a>? It’s clear what this is if the address is
|
|
the address of an allocated block? But do we guarantee anything if
|
|
it isn’t? The implementation succeeds if the address points
|
|
anywhere within a page allocated to a pool.</p>
|
|
<p><em>Answer:</em> don’t specify result except in supported cases. Not
|
|
false positive but never false negative.</p>
|
|
</li>
|
|
<li><p class="first">Constraints on order of destructors. Is it an error to destroy an
|
|
object format while there are still pools that refer to it?</p>
|
|
<p><em>Answer:</em> yes.</p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal"><span class="pre">mps.h</span></tt> declares the type <tt class="docutils literal"><span class="pre">mps_shift_t</span></tt> for a “shift amount”
|
|
but this is not used anywhere in the MPS. Remove?</p>
|
|
<p><em>Action:</em> removed in <a class="reference external" href="http://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?@describe+179944">change 179944</a>.</p>
|
|
</li>
|
|
<li><p class="first">The structures <tt class="docutils literal"><span class="pre">mps_sac_s</span></tt> and <tt class="docutils literal"><span class="pre">mps_sac_freelist_block_s</span></tt> are
|
|
declared in mps.h. I presume that this is so for the benefit of
|
|
the macros <a class="reference internal" href="topic/cache.html#MPS_SAC_ALLOC_FAST" title="MPS_SAC_ALLOC_FAST"><tt class="xref c c-func docutils literal"><span class="pre">MPS_SAC_ALLOC_FAST()</span></tt></a> and
|
|
<a class="reference internal" href="topic/cache.html#MPS_SAC_FREE_FAST" title="MPS_SAC_FREE_FAST"><tt class="xref c c-func docutils literal"><span class="pre">MPS_SAC_FREE_FAST()</span></tt></a>, and the details of these structues
|
|
are not actually part of the public interface.</p>
|
|
<p><em>Answer:</em> RB thinks the client doesn’t need to know about these
|
|
structures, so they ought to have names starting with
|
|
underscores.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003321/">job003321</a>.</p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal"><span class="pre">mps_fmt_fixed_s</span></tt> is just like <a class="reference internal" href="topic/format.html#mps_fmt_A_s" title="mps_fmt_A_s"><tt class="xref c c-type docutils literal"><span class="pre">mps_fmt_A_s</span></tt></a> but with no
|
|
“skip”. I presume it’s for fixed-size pools. But the only
|
|
fixed-size pool is MFS, which has no public header, so I presume
|
|
it’s for MPS internal use only. What should I say about this?</p>
|
|
<p><em>Answer:</em> leave it undocumented. Maybe it (and
|
|
<tt class="docutils literal"><span class="pre">mps_fmt_create_fixed</span></tt>) should be removed?</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003322/">job003322</a>.</p>
|
|
</li>
|
|
<li><p class="first">It’s rather unfortunate that <a class="reference internal" href="topic/arena.html#mps_arena_create" title="mps_arena_create"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_create()</span></tt></a> take
|
|
arguments in the order <tt class="docutils literal"><span class="pre">size</span></tt>, <tt class="docutils literal"><span class="pre">base</span></tt> but
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_extend" title="mps_arena_extend"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_extend()</span></tt></a> takes them in the order <tt class="docutils literal"><span class="pre">base</span></tt>,
|
|
<tt class="docutils literal"><span class="pre">size</span></tt>. I guess there’s nothing to be done about this now.</p>
|
|
<p><em>Answer:</em> RB plans to remove <a class="reference internal" href="topic/arena.html#mps_arena_create" title="mps_arena_create"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_create()</span></tt></a> and
|
|
other varargs functions.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003323/">job003323</a>.</p>
|
|
</li>
|
|
<li><p class="first">Need notes about performance. It’s important to know that
|
|
<a class="reference internal" href="topic/pool.html#mps_addr_pool" title="mps_addr_pool"><tt class="xref c c-func docutils literal"><span class="pre">mps_addr_pool()</span></tt></a> is really quick and it’s fine to call
|
|
it. But other things are slow, e.g. walking over all objects.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003324/">job003324</a>.</p>
|
|
</li>
|
|
<li><p class="first">Mark all the allocation frame stuff as deprecated in the manual.</p>
|
|
<p><em>Action:</em> I marked them all as deprecated in version 1.111.</p>
|
|
</li>
|
|
<li><p class="first">“since version 1.111” is wrong: “starting with version 1.111”
|
|
would be right.</p>
|
|
</li>
|
|
<li><p class="first"><a class="reference internal" href="topic/arena.html#mps_collections" title="mps_collections"><tt class="xref c c-func docutils literal"><span class="pre">mps_collections()</span></tt></a> should of course have been called
|
|
<tt class="xref c c-func docutils literal"><span class="pre">mps_arena_collections()</span></tt> but it’s pretty meaningless
|
|
because the collector is asynchronous (as we saw in the Scheme
|
|
example). It might make more sense to deprecate it and add a new
|
|
function <tt class="xref c c-func docutils literal"><span class="pre">mps_message_gc_start_collection()</span></tt> that returns the
|
|
collection number for 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>.</p>
|
|
<p><em>Action:</em> added to <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003318/">job003318</a>.</p>
|
|
</li>
|
|
<li><p class="first">After you destroy an allocation point, can you continue to use the
|
|
objects you allocated on it?</p>
|
|
<p><em>Answer:</em> the objects you have committed are fine.</p>
|
|
</li>
|
|
<li><p class="first">What’s the condition for <a class="reference internal" href="topic/thread.html#mps_thread_reg" title="mps_thread_reg"><tt class="xref c c-func docutils literal"><span class="pre">mps_thread_reg()</span></tt></a> when you have
|
|
multiple arenas? Do you need to register each thread with each
|
|
arena? Or is it acceptable to register a thread with only some of
|
|
your arenas so long as you satisfy some condition? (e.g. that the
|
|
thread promises only to access blocks allocated in the arenas it
|
|
is registered with?)</p>
|
|
<p>Similarly for <a class="reference internal" href="topic/thread.html#mps_thread_dereg" title="mps_thread_dereg"><tt class="xref c c-func docutils literal"><span class="pre">mps_thread_dereg()</span></tt></a>: “after deregistration,
|
|
the thread must not access any blocks allocated in that arena.”</p>
|
|
<p><em>Answer:</em> a thread that never uses a pointer to an address in an
|
|
automatically managed pool need not be registered. Note: recommend
|
|
that the user register all threads and scan all their stacks.</p>
|
|
</li>
|
|
<li><p class="first">What’s the condition for needing to register a thread at all? If
|
|
you have a single-threaded program does that thread still need to
|
|
be registered? What if you have no moving pools? etc.</p>
|
|
<p><em>Answer:</em> see above.</p>
|
|
</li>
|
|
<li><p class="first">Start adding <a class="reference internal" href="genindex.html"><em>Index</em></a> entries.</p>
|
|
</li>
|
|
<li><p class="first">I documented the requirement for tags to be removed when calling
|
|
<tt class="xref c c-func docutils literal"><span class="pre">MPS_FIX()</span></tt>, but does this apply to format auto-header?</p>
|
|
<p><em>Answer:</em> auto-header pool does the subtraction, so this is an
|
|
exception to the rule.</p>
|
|
</li>
|
|
<li><p class="first">How do you create an auto-header format with a class method?</p>
|
|
<p><em>Answer:</em> this is just missing functionality. Also, not clear what
|
|
the class method is for.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003325/">job003325</a>.</p>
|
|
</li>
|
|
<li><p class="first">Doc for <tt class="xref c c-func docutils literal"><span class="pre">mps_arena_class_vmnz()</span></tt> says, “This class is
|
|
similar to <a class="reference internal" href="topic/arena.html#mps_arena_class_vm" title="mps_arena_class_vm"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_class_vm()</span></tt></a>, except that it has a
|
|
simple placement policy (“no zones”) that makes it slightly
|
|
faster.” Presumably there’s a corresponding disadvantage,
|
|
otherwise why would you use <a class="reference internal" href="topic/arena.html#mps_arena_class_vm" title="mps_arena_class_vm"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_class_vm()</span></tt></a> rather
|
|
than this?</p>
|
|
<p><em>Answer:</em> There’s a massive disadvantage: the lack of zones makes
|
|
automatic memory management much slower. Remove the sentence. Not
|
|
clear what <tt class="xref c c-func docutils literal"><span class="pre">mps_arena_class_vmnz()</span></tt> is for (maybe when you
|
|
have no automatic pools?)</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003326/">job003326</a>.</p>
|
|
</li>
|
|
<li><p class="first">Some of the <a class="reference internal" href="topic/allocation.html#mps_ap_s" title="mps_ap_s"><tt class="xref c c-type docutils literal"><span class="pre">mps_ap_s</span></tt></a> structure is public. What are the
|
|
use cases for the client program accessing these values other than
|
|
via <a class="reference internal" href="topic/allocation.html#mps_reserve" title="mps_reserve"><tt class="xref c c-func docutils literal"><span class="pre">mps_reserve()</span></tt></a> and <a class="reference internal" href="topic/allocation.html#mps_commit" title="mps_commit"><tt class="xref c c-func docutils literal"><span class="pre">mps_commit()</span></tt></a>? Wouldn’t they
|
|
need to know about <a class="reference internal" href="topic/allocation.html#mps_ap_fill" title="mps_ap_fill"><tt class="xref c c-func docutils literal"><span class="pre">mps_ap_fill()</span></tt></a> and <a class="reference internal" href="topic/allocation.html#mps_ap_trip" title="mps_ap_trip"><tt class="xref c c-func docutils literal"><span class="pre">mps_ap_trip()</span></tt></a>
|
|
if they were doing their own thing? But these function have
|
|
comments saying “should never be “called” directly by the client
|
|
code.”</p>
|
|
<p><em>Answer:</em> if you’re not writing client code in C (e.g. writing a
|
|
compiler, and you want to inline your allocation: you can’t use
|
|
the macros, you can generate the equivalent code). The comments in
|
|
<tt class="docutils literal"><span class="pre">mpsi.c</span></tt> are simply wrong. See RB’s <a class="reference external" href="https://github.com/dylan-lang/opendylan/issues/235">issue 235</a> on the OpenDylan bug
|
|
tracker for advice about what’s expected.</p>
|
|
<p><em>Action:</em> See what refers to these bogus comments and see if
|
|
there’s a reason. (There isn’t.) If not: reverse the sense of the
|
|
comments and refer to manual. (Done in <a class="reference external" href="http://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?@describe+179971">change 179971</a>.)</p>
|
|
</li>
|
|
<li><p class="first">What about reservoirs? Is the idea that the client’s handler for
|
|
low-memory situations (whether it’s an error message or whatever)
|
|
might need to allocate? And so you can ask the MPS to reserve a
|
|
reservoir for this situation?</p>
|
|
<p><em>Answer:</em> leave it undocumented for now.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003327/">job003327</a>.</p>
|
|
</li>
|
|
<li><p class="first">Potential optimization of reserve/commit protocol: maybe we don’t
|
|
need to call <a class="reference internal" href="topic/allocation.html#mps_ap_trip" title="mps_ap_trip"><tt class="xref c c-func docutils literal"><span class="pre">mps_ap_trip()</span></tt></a>?</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003328/">job003328</a>.</p>
|
|
</li>
|
|
<li><p class="first">What are we supposed to say about <a class="reference internal" href="topic/allocation.html#mps_ap_fill" title="mps_ap_fill"><tt class="xref c c-func docutils literal"><span class="pre">mps_ap_fill()</span></tt></a> and
|
|
<a class="reference internal" href="topic/allocation.html#mps_ap_trip" title="mps_ap_trip"><tt class="xref c c-func docutils literal"><span class="pre">mps_ap_trip()</span></tt></a>?</p>
|
|
<p><em>Answer:</em> Say that they should only be called as part of the
|
|
allocation point protocol.</p>
|
|
</li>
|
|
<li><p class="first">What is the purpose of <a class="reference internal" href="topic/allocation.html#MPS_RESERVE_BLOCK" title="MPS_RESERVE_BLOCK"><tt class="xref c c-func docutils literal"><span class="pre">MPS_RESERVE_BLOCK()</span></tt></a>? It does the
|
|
same thing as <a class="reference internal" href="topic/allocation.html#mps_reserve" title="mps_reserve"><tt class="xref c c-func docutils literal"><span class="pre">mps_reserve()</span></tt></a>, but can only be used as a
|
|
statement, whereas the latter can also be used as an
|
|
expression. So I can’t say, “in such-and-such a circumstance use
|
|
<a class="reference internal" href="topic/allocation.html#MPS_RESERVE_BLOCK" title="MPS_RESERVE_BLOCK"><tt class="xref c c-func docutils literal"><span class="pre">MPS_RESERVE_BLOCK()</span></tt></a>”.</p>
|
|
<p><em>Answer:</em> it takes an lvalue instead of a pointer so it may
|
|
generate better code.</p>
|
|
</li>
|
|
<li><p class="first">“Reserve/commit protocol” or “allocation point protocol”?</p>
|
|
<p><em>Answer:</em> the latter.</p>
|
|
</li>
|
|
<li><p class="first">What about <tt class="xref c c-func docutils literal"><span class="pre">mps_alert_collection_set()</span></tt>? Seems dodgy to me.</p>
|
|
<p><em>Answer:</em> leave it undocumented.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003329/">job003329</a>.</p>
|
|
</li>
|
|
<li><p class="first">When a <tt class="docutils literal"><span class="pre">..</span> <span class="pre">note::</span></tt> block contains a numbered list with multiple
|
|
items (as <a class="reference internal" href="guide/lang.html#guide-lang-scan"><em>here</em></a>) or multiple footnotes (as
|
|
<a class="reference internal" href="pool/intro.html#pool-properties"><em>here</em></a>) the heading should say “Notes”.</p>
|
|
</li>
|
|
<li><p class="first">The names of the sectors on the “treadmill” diagram don’t
|
|
correspond exactly to the names in <a class="reference external" href="http://www.pipeline.com/~hbaker1/NoMotionGC.html">Baker 1991</a>.</p>
|
|
<p><em>Answer:</em> these names come from the diagram in <a class="reference internal" href="mmref/bib.html#jones96"><em>Jones (1996)</em></a> and refer to concepts that are missing from the
|
|
glossary: <a class="reference internal" href="glossary/f.html#term-fromspace"><em class="xref std std-term">fromspace</em></a>, <a class="reference internal" href="glossary/t.html#term-tospace"><em class="xref std std-term">tospace</em></a> (with synonyms
|
|
<a class="reference internal" href="glossary/o.html#term-old-space"><em class="xref std std-term">old space</em></a> and <a class="reference internal" href="glossary/n.html#term-new-space"><em class="xref std std-term">new space</em></a>).</p>
|
|
<p><em>Action:</em> add these concepts to the glossary. Label the treadmill
|
|
diagram with “fromspace”, “tospace”, and so on, rather than just
|
|
“from” and “to”. Here and elsewhere, refer to <a class="reference internal" href="mmref/bib.html#jones12"><em>Jones (2012)</em></a> for preferred terminology. See in particular page 138.</p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal"><span class="pre">eventcnv</span> <span class="pre">-b</span> <span class="pre"><bucket</span> <span class="pre">size></span></tt> seems to be useless. See
|
|
<a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003331/">job003331</a>, <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003332/">job003332</a>, <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003333/">job003333</a>, <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003334/">job003334</a>, and
|
|
<a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003335/">job003335</a>. NB’s work on eventsql suggests that maybe there’s no
|
|
point in trying to make it work again (because eventsql will be
|
|
able to do this kind of aggregation and much more). So maybe best
|
|
to deprecate or remove this feature? For the moment I’ve left it
|
|
undocumented.</p>
|
|
<p><em>Answer:</em> <tt class="docutils literal"><span class="pre">eventcnv</span></tt> was always intended to be a simple tool that
|
|
just translates events, not a report generator.</p>
|
|
<p><em>Action:</em> remove the -e, -b and -v options. (-v should be always
|
|
turned on.) Also remove the label processing. Look at NB’s branch
|
|
in case he’s done some of this work already. (He hasn’t.)</p>
|
|
</li>
|
|
<li><p class="first">Write something about telemetry labels in the telemetry chapter of
|
|
the reference manual.</p>
|
|
</li>
|
|
</ol>
|
|
<ol class="arabic" start="77">
|
|
<li><p class="first">The debugging section on <a class="reference internal" href="guide/debug.html#guide-debug-underscanning"><em>Example: underscanning</em></a> is not
|
|
entirely convincing as to the utility of the telemetry. I’d like
|
|
to have a more compelling example here.</p>
|
|
<p><em>Answer:</em> a better example is going to have to wait for better
|
|
tools.</p>
|
|
</li>
|
|
<li><p class="first">Should memory addresses increase going up the page, or down the
|
|
page? The output of gdb’s <tt class="docutils literal"><span class="pre">x</span></tt> command always has them going down
|
|
the page so maybe we should follow that? It would involve turning
|
|
a bunch of diagrams upside down.</p>
|
|
<p><em>Answer:</em> <a class="reference internal" href="mmref/bib.html#jones12"><em>Jones (2012)</em></a> has addresses increasing
|
|
as they go down the page, so let’s follow that.</p>
|
|
</li>
|
|
<li><p class="first">Suppose that in the Scheme interpreter you wanted to return some
|
|
statistics from the <tt class="docutils literal"><span class="pre">(gc)</span></tt> function, how would you do this? You
|
|
could poll the message queue after calling
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_collect" title="mps_arena_collect"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_collect()</span></tt></a> and before calling
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_release" title="mps_arena_release"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_release()</span></tt></a>, I suppose.</p>
|
|
<p><em>Answer:</em> this might happen to work, but it’s not supported.</p>
|
|
</li>
|
|
<li><p class="first">Need to migrate the new Scheme functionality (new make_string, fix
|
|
to append, new entry points) back to the “before the MPS” version.</p>
|
|
<p><em>Action:</em> done in <a class="reference external" href="http://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?@describe+180069">change 180069</a>.</p>
|
|
</li>
|
|
<li><p class="first">The Scheme interpreter could avoid printing “<tt class="docutils literal"><span class="pre">#[undefined]</span></tt>” at
|
|
the REPL (like Python with <tt class="docutils literal"><span class="pre">None</span></tt>).</p>
|
|
<p><em>Answer:</em> not useful.</p>
|
|
</li>
|
|
<li><p class="first">Is the message example correct?</p>
|
|
<p><em>Answer:</em> no, the MPS doesn’t guarantee the timely delivery of
|
|
messages, so this example is invalid. Remove it.</p>
|
|
<p><em>Action:</em> what we could do is return a collection ID from
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_collect" title="mps_arena_collect"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_collect()</span></tt></a>, <a class="reference internal" href="topic/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> and
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_park" title="mps_arena_park"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_park()</span></tt></a>, and provide a mechanism to get the
|
|
collection ID from the collection message. I added this suggestion
|
|
to <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003318/">job003318</a>.</p>
|
|
</li>
|
|
<li><p class="first">If a block has been finalized, can you “resurrect” it and
|
|
re-register it for finalization?</p>
|
|
<p><em>Answer:</em> make a note about resurrection in the MPS not being the
|
|
same as the usual notion. It’s fine to re-register after
|
|
retrieving the message.</p>
|
|
</li>
|
|
<li><p class="first">If a block has been registered for finalization more than once,
|
|
what happens if you deregister it? Do you have to deregister it as
|
|
many times as you registered it? Or do you only need to deregister
|
|
it once?</p>
|
|
<p><em>Answer:</em> say nothing about this esoteric subject.</p>
|
|
</li>
|
|
<li><p class="first">What exactly is our policy about support for the documented
|
|
behaviour of public identifiers. “The documented behaviour of
|
|
public identifiers will not be changed in a backward-incompatible
|
|
fashion without a period of notice lasting at least one version.”</p>
|
|
<p><em>Answer:</em> “We intend to support the existence and behaviour of
|
|
documented symbols. We will only remove or change these on a
|
|
version change (not between patch releases). Normally one
|
|
version’s notice.”</p>
|
|
</li>
|
|
<li><p class="first">In <tt class="docutils literal"><span class="pre">buffer.c</span></tt> it says:</p>
|
|
<div class="highlight-c"><div class="highlight"><pre><span class="cm">/* Assumes pun compatibility between Rank and mps_rank_t */</span>
|
|
<span class="cm">/* Which is checked by mpsi_check in <code/mpsi.c> */</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>but I see no such check in <tt class="docutils literal"><span class="pre">mpsi_check</span></tt>.</p>
|
|
<p><em>Answer:</em> the comment was wrong: ranks are no longer part of the
|
|
public interface. Removed in <a class="reference external" href="http://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?@describe+180031">change 180031</a>.</p>
|
|
</li>
|
|
<li><p class="first">Could simplify a lot of glossary references if plurals were
|
|
handled automatically. That is, if a glossary entry for “bytes
|
|
(1)” is found to be missing, then “byte (1)” should be tried
|
|
instead. (Similarly for hyphens versus spaces.)</p>
|
|
</li>
|
|
<li><p class="first">Where glossary entries differ on in hyphens versus spaces there’s
|
|
no need to give both.</p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal"><span class="pre">MPS_TELEMETRY_CONTROL=65535</span></tt> is ugly. Why not
|
|
<tt class="docutils literal"><span class="pre">MPS_TELEMETRY_CONTROL=all</span></tt>?</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003340/">job003340</a>.</p>
|
|
</li>
|
|
<li><p class="first">Chapters in the User Guide need a conclusion of some kind. e.g. in
|
|
debugging, what should you do if this hasn’t helped?</p>
|
|
<p><em>Action:</em> added “What now?” section.</p>
|
|
</li>
|
|
<li><p class="first">Chapter about the community resources. “Get in touch”. See LLVM
|
|
and Boost for examples of this kind of thing. Put it in the
|
|
sidebar so it’s always there.</p>
|
|
<p><em>Action:</em> added “Contact us” page and link in the sidebar of every
|
|
page.</p>
|
|
</li>
|
|
<li><p class="first">Extensibility: “Writing your own pool or need a pool that’s not
|
|
listed here: have a go, but get in touch.” We can write new pool
|
|
classes for you.</p>
|
|
<p><em>Action:</em> added a section to the Pool reference.</p>
|
|
</li>
|
|
<li><p class="first">Multi-core is not supported (except in the case of multiple
|
|
arenas). See the <a class="reference external" href="http://news.ycombinator.com/item?id=4521988">Hacker News thread</a>. Could be done by
|
|
running the MPS in a separate process but that might be horrible
|
|
and heavyweight.</p>
|
|
<p>There may be more documentation needed here (in
|
|
<a class="reference internal" href="topic/thread.html#topic-thread"><em>Threads</em></a>): if the mutator is multi-threaded, it needs
|
|
to reserve <tt class="docutils literal"><span class="pre">SIGUSR1</span></tt> (or whatever the actual signal is) for use
|
|
by the MPS. [It turned out that <tt class="docutils literal"><span class="pre">SIGBUS</span></tt> or <tt class="docutils literal"><span class="pre">SIGSEGV</span></tt> is used
|
|
for this purpose, not <tt class="docutils literal"><span class="pre">SIGUSR1</span></tt>.]</p>
|
|
<p>Also <tt class="docutils literal"><span class="pre">SIGBUS</span></tt> (xc) or <tt class="docutils literal"><span class="pre">SIGSEGV</span></tt> (fr, li) or “first chance
|
|
exception handler” (w3). Affects debugging. Also, if you handle your
|
|
own SIGBUS etc then you need to give us a call.</p>
|
|
<p><em>Action:</em> added a section on “Signal handling issues” to
|
|
<a class="reference internal" href="topic/thread.html#topic-thread"><em>Threads</em></a>. (Not clear that this is the right place,
|
|
since it isn’t really thread-specific, but I couldn’t find a
|
|
better place and I can always move it later.)</p>
|
|
</li>
|
|
<li><p class="first">Maybe target R4RS instead of R6RS? (R4RS is the “one true”
|
|
Scheme.)</p>
|
|
<p><em>Action:</em> fixed in <a class="reference external" href="http://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?@describe+180033">change 180033</a>.</p>
|
|
</li>
|
|
<li><p class="first">Bring <a class="reference internal" href="mmref/lang.html#lang"><em>Memory management in various languages</em></a> up to date. Add C#, Lua, Python.</p>
|
|
</li>
|
|
<li><p class="first">Change “event” to “event category” in discussion of the telemetry
|
|
filter.</p>
|
|
</li>
|
|
<li><p class="first">In <a class="reference internal" href="guide/debug.html#guide-debug"><em>Debugging with the Memory Pool System</em></a>, need to provide more context around each
|
|
assertion, using GDB command <tt class="docutils literal"><span class="pre">list</span></tt>.</p>
|
|
</li>
|
|
<li><p class="first">In the “Cautions” section of <a class="reference internal" href="topic/finalization.html#topic-finalization"><em>Finalization</em></a>, add
|
|
something to effect of, “A block might be dead and yet not
|
|
finalizable, because it is being kept alive by an ambiguous
|
|
reference.”</p>
|
|
</li>
|
|
<li><p class="first">What does this mean in <a class="reference internal" href="topic/finalization.html#topic-finalization"><em>Finalization</em></a>:
|
|
“mps_pool_destroy() should therefore not be invoked on pools
|
|
containing objects registered for finalization.”</p>
|
|
<p><em>Answer:</em> This is clearly a misfeature if true, because how could
|
|
you destroy a pool containing finalizable objects?</p>
|
|
<p><em>Action:</em> make <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003341/">job003341</a></p>
|
|
</li>
|
|
<li><p class="first">Try to find “GARBAGE COLLECTING... HERE ARE SOME INTERESTING
|
|
STATISTICS” early Lisp anecdote and put it in
|
|
<a class="reference internal" href="topic/telemetry.html#topic-telemetry"><em>Telemetry</em></a>.</p>
|
|
<p>The anecdote is at the end of <a class="reference internal" href="mmref/bib.html#mccarthy79"><em>McCarthy (1979)</em></a>.</p>
|
|
</li>
|
|
<li><p class="first">Are there any other use cases for the clamped and parked states?
|
|
Are there any use cases that apply specifically to the parked
|
|
state?</p>
|
|
<p><em>Answer:</em> clamp prevents a flip and so buffers can’t be trapped,
|
|
and so <a class="reference internal" href="topic/allocation.html#mps_commit" title="mps_commit"><tt class="xref c c-func docutils literal"><span class="pre">mps_commit()</span></tt></a> will always succeed, and so
|
|
allocation will always run at max speed.</p>
|
|
<p>It might be helpful for debugging, for example you might want to
|
|
type it at the GDB prompt to ensure that nothing moves around
|
|
while you are debugging.</p>
|
|
</li>
|
|
<li><p class="first">It’s kind of a shame that the MPS has two means for “committed”.
|
|
<a class="reference internal" href="glossary/c.html#term-committed-1"><em class="xref std std-term">committed<sup>(1)</sup></em></a> meaning “mapped to RAM”, as in
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_commit_limit" title="mps_arena_commit_limit"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_commit_limit()</span></tt></a>; and <a class="reference internal" href="glossary/c.html#term-committed-2"><em class="xref std std-term">committed<sup>(2)</sup></em></a>
|
|
meaning “initialized and placed under management by the MPS”, as
|
|
in <a class="reference internal" href="topic/allocation.html#mps_commit" title="mps_commit"><tt class="xref c c-func docutils literal"><span class="pre">mps_commit()</span></tt></a>. Probably too late to do anything about
|
|
this.</p>
|
|
<p><em>Answer:</em> too late to change.</p>
|
|
</li>
|
|
<li><p class="first">The documentation for <a class="reference internal" href="topic/arena.html#mps_arena_has_addr" title="mps_arena_has_addr"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_has_addr()</span></tt></a> says, “call
|
|
this function and interpret the result while the arena is in the
|
|
<a class="reference internal" href="glossary/p.html#term-parked-state"><em class="xref std std-term">parked state</em></a>”. Similarly, <a class="reference internal" href="topic/root.html#mps_arena_roots_walk" title="mps_arena_roots_walk"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_roots_walk()</span></tt></a>
|
|
says “This function may only be called when the arena is in the
|
|
<a class="reference internal" href="glossary/p.html#term-parked-state"><em class="xref std std-term">parked state</em></a>.” What’s wrong with the clamped state in
|
|
these cases? (I can see that <a class="reference internal" href="topic/root.html#mps_arena_roots_walk" title="mps_arena_roots_walk"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_roots_walk()</span></tt></a>
|
|
asserts if not in the parked state, but I guess I’d like an
|
|
explanation.)</p>
|
|
<p><em>Answer:</em> there’s still stuff going on in the clamped state.</p>
|
|
</li>
|
|
<li><p class="first">Are there use cases for <a class="reference internal" href="topic/arena.html#mps_arena_collect" title="mps_arena_collect"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_collect()</span></tt></a> other than
|
|
development and testing?</p>
|
|
<p><em>Answer:</em> probably not. “You might think that...”</p>
|
|
</li>
|
|
<li><p class="first">It’s a shame that the names <a class="reference internal" href="topic/arena.html#mps_arena_release" title="mps_arena_release"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_release()</span></tt></a> and
|
|
“unclamped state” don’t match. Could I call the “unclamped state”
|
|
the “released state” in the documentation?</p>
|
|
<p><em>Answer:</em> too late to change.</p>
|
|
</li>
|
|
<li><p class="first">After calling <a class="reference internal" href="topic/arena.html#mps_arena_expose" title="mps_arena_expose"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_expose()</span></tt></a>, how do you restore the
|
|
protection? Do you have to call <a class="reference internal" href="topic/arena.html#mps_arena_release" title="mps_arena_release"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_release()</span></tt></a> or
|
|
are there other functions that will do the job, e.g.
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_collect" title="mps_arena_collect"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_collect()</span></tt></a>, <a class="reference internal" href="topic/arena.html#mps_arena_start_collect" title="mps_arena_start_collect"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_start_collect()</span></tt></a>,
|
|
or <a class="reference internal" href="topic/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>?</p>
|
|
<p><em>Answer:</em> the protection will arise naturally: no need to call
|
|
anything specific.</p>
|
|
</li>
|
|
<li><p class="first"><a class="reference internal" href="topic/arena.html#mps_arena_unsafe_expose_remember_protection" title="mps_arena_unsafe_expose_remember_protection"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_unsafe_expose_remember_protection()</span></tt></a> and
|
|
<a class="reference internal" href="topic/arena.html#mps_arena_unsafe_restore_protection" title="mps_arena_unsafe_restore_protection"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_unsafe_restore_protection()</span></tt></a> are kind of hairy
|
|
(as well as having absurd names). What’s the use case? Exposing
|
|
the MPS “is expected only to be useful for debugging” so why have
|
|
special unsafe functions for optimizing the expose/restore
|
|
procedure? Maybe these should be left undocumented?</p>
|
|
<p><em>Answer:</em> Deprecate them for the moment. Make a job to
|
|
investigate the use case.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003342/">job003342</a></p>
|
|
</li>
|
|
<li><p class="first">Have I correctly explained why the documentation is not very
|
|
forthcoming about the set of result codes a function might
|
|
return?</p>
|
|
<p><em>Answer:</em> the paragraph is fine, but there’s a job here. For some
|
|
functions we could say something along the lines of: “if you
|
|
receive MPS_RES_X, that means Y”.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003343/">job003343</a></p>
|
|
</li>
|
|
<li><p class="first">NB’s <a class="reference external" href="http://info.ravenbrook.com/project/mps/doc/2002-06-18/obsolete-mminfo/mmdoc/protocol/mps/format/index.html">MPS Format Protocol</a>
|
|
says that formats A and B are deprecated. Surely this isn’t the
|
|
case? That would leave only auto-header supported.</p>
|
|
<p><em>Answer:</em> ask NB, he wrote it.</p>
|
|
</li>
|
|
<li><p class="first">Say something about assertions and varieties in the error chapter.</p>
|
|
</li>
|
|
<li><p class="first">Need discussion in <a class="reference internal" href="topic/format.html#topic-format"><em>Object formats</em></a> under
|
|
<a class="reference internal" href="topic/format.html#mps_fmt_auto_header_s" title="mps_fmt_auto_header_s"><tt class="xref c c-type docutils literal"><span class="pre">mps_fmt_auto_header_s</span></tt></a> about client pointers versus base
|
|
pointers.</p>
|
|
</li>
|
|
<li><p class="first">What’s the purpose of allocation frames and the SNC pool class?
|
|
Perhaps ask Pekka about how it’s worked out for Global Graphics.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003344/">job003344</a></p>
|
|
</li>
|
|
<li><p class="first">Note about sizes of generations in the Scheme example are
|
|
deliberately chosen to be small so you can see it working.</p>
|
|
</li>
|
|
<li><p class="first">What’s the purpose of segregated allocation caches?</p>
|
|
<p><em>Answer:</em> There might be a paper about SACs. Run program once and
|
|
write down the sizes of the objects you allocate. Change malloc
|
|
into a macro that tests the size (because the size is almost
|
|
always constant). Dramatic improvement in performance and
|
|
reduction in fragmentation. Interface to a pool that allows it to
|
|
exploit this pattern. Perhaps in use in ScriptWorks? Write to
|
|
Pekka and ask him how this has worked out. (After 1.111.0.)</p>
|
|
</li>
|
|
<li><p class="first">Need to associate paragraph of text with deprecation notice. (See
|
|
for example <a class="reference internal" href="topic/scanning.html#mps_fix" title="mps_fix"><tt class="xref c c-func docutils literal"><span class="pre">mps_fix()</span></tt></a>.) Also, deprecation notices need
|
|
nicer formatting.</p>
|
|
</li>
|
|
<li><p class="first">“The maximum number of arenas that the system can support is
|
|
around 10.” Is this true? What goes wrong? (I tried creating lots
|
|
of arenas and nothing seemed to go wrong.)</p>
|
|
<p><em>Answer:</em> this was probably a finger in the air. Remove it.</p>
|
|
</li>
|
|
<li><p class="first">Consistent pluralization in headings. “Arena states”. “Other
|
|
notes” → “Ambiguous references”. “You could use this to optimize
|
|
the scan by avoiding the need to reassemble and store the updated
|
|
reference after calling <a class="reference internal" href="topic/scanning.html#MPS_FIX2" title="MPS_FIX2"><tt class="xref c c-func docutils literal"><span class="pre">MPS_FIX2()</span></tt></a>.</p>
|
|
</li>
|
|
<li><p class="first">Add comments giving links to sources.</p>
|
|
</li>
|
|
<li><p class="first">This (from <a class="reference internal" href="topic/critical.html#topic-critical"><em>The critical path</em></a>) needs mentioning in various
|
|
places: “it’s important to give a good estimate of the amount of
|
|
address space you will ever occupy with objects when you
|
|
initialize the arena”.</p>
|
|
</li>
|
|
<li><p class="first">“Magic” needs explaining in <a class="reference internal" href="topic/location.html#topic-location"><em>Location dependency</em></a>.</p>
|
|
<p><em>Answer:</em> that’s because we hit it: it didn’t move.</p>
|
|
</li>
|
|
<li><p class="first">Documentation needs copying into <tt class="docutils literal"><span class="pre">scheme.c</span></tt>.</p>
|
|
</li>
|
|
<li><p class="first">What’s a “class structure”? (See <a class="reference internal" href="topic/cache.html#mps_sac_alloc" title="mps_sac_alloc"><tt class="xref c c-func docutils literal"><span class="pre">mps_sac_alloc()</span></tt></a> and
|
|
<a class="reference internal" href="topic/cache.html#mps_sac_free" title="mps_sac_free"><tt class="xref c c-func docutils literal"><span class="pre">mps_sac_free()</span></tt></a>.) Does it mean “exactly the same set of
|
|
size classes in the same order”? Or even “exactly the same
|
|
pointer to array of size classes”?</p>
|
|
<p><em>Answer:</em> probably the former. Check the code.</p>
|
|
</li>
|
|
<li><p class="first">Needs to be a topic on low memory handling. How can you do this
|
|
while still keeping the allocation fast and inline? How does the
|
|
MPS behave when it’s low on memory? Performance degrades (due to
|
|
running out of zones) and then there are emergency collections.</p>
|
|
<p><em>Action:</em> created <em class="xref std std-ref">topic-low</em>.</p>
|
|
</li>
|
|
</ol>
|
|
<ol class="arabic" start="127">
|
|
<li><p class="first"><a class="reference internal" href="topic/root.html#mps_arena_roots_walk" title="mps_arena_roots_walk"><tt class="xref c c-func docutils literal"><span class="pre">mps_arena_roots_walk()</span></tt></a> says, “A client-supplied function
|
|
is called for every root reference which points to an object in
|
|
any automatically managed pools”. Is this right?</p>
|
|
<p><em>Answer:</em> the description seems to be right. What’s the use case?
|
|
If none, deprecate it.</p>
|
|
</li>
|
|
<li><p class="first">From <a class="reference internal" href="topic/thread.html#topic-thread"><em>Threads</em></a>: “A thread must be registered with an
|
|
<a class="reference internal" href="glossary/a.html#term-arena"><em class="xref std std-term">arena</em></a> if it ever uses a pointer to a location in an
|
|
<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">pool</em></a> belonging to that arena.” This isn’t quite right,
|
|
and the real requirement is quite hard to document, so perhaps we
|
|
need to make this a documented property of the pool (“whether or
|
|
not threads that access memory allocated in the pool need to be
|
|
registered”). Similarly in <a class="reference internal" href="topic/thread.html#mps_thread_dereg" title="mps_thread_dereg"><tt class="xref c c-func docutils literal"><span class="pre">mps_thread_dereg()</span></tt></a>.</p>
|
|
</li>
|
|
<li><p class="first">What happens if a thread is killed or otherwise terminates
|
|
without being deregistered? Does the MPS go wrong?</p>
|
|
<p><em>Answer:</em> Probably all we do is try to send signals to it. What
|
|
does pthreads do with this? It may be hard for the client program
|
|
to deregister all their threads: better for the MPS to cope
|
|
gracefully.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003348/">job003348</a>.</p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal"><span class="pre">readme.txt</span></tt> should contain a brief overview and pointers to
|
|
more documentation, and should (only) duplicate other
|
|
documentation. There’s nothing wrong with it being somewhat
|
|
redundant. Its supported platforms section doesn’t exist
|
|
elsewhere. Note that the platforms we build with (in
|
|
<tt class="docutils literal"><span class="pre">build.txt</span></tt>) is not the same list.</p>
|
|
</li>
|
|
<li><p class="first">Is <a class="reference internal" href="topic/interface.html#mps_clock_t" title="mps_clock_t"><tt class="xref c c-type docutils literal"><span class="pre">mps_clock_t</span></tt></a> a transparent alias for <tt class="docutils literal"><span class="pre">unsigned</span>
|
|
<span class="pre">long</span></tt>? I presume it must be: if it were platform-specific, or
|
|
supplied by the plinth, then it wouldn’t be defined in <tt class="docutils literal"><span class="pre">mps.h</span></tt>,
|
|
surely?</p>
|
|
<p><em>Answer:</em> this is a bug, fixed in <a class="reference external" href="http://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?@describe+180151">change 180151</a>.</p>
|
|
</li>
|
|
</ol>
|
|
<blockquote>
|
|
<div></div></blockquote>
|
|
<ol class="arabic" start="132">
|
|
<li><p class="first"><a class="reference internal" href="topic/plinth.html#mps_lib_get_stderr" title="mps_lib_get_stderr"><tt class="xref c c-func docutils literal"><span class="pre">mps_lib_get_stderr()</span></tt></a> appears in <tt class="docutils literal"><span class="pre">mpslib.h</span></tt> and
|
|
<tt class="docutils literal"><span class="pre">mpsliban.c</span></tt> but is not called by the MPS (it uses
|
|
<a class="reference internal" href="topic/plinth.html#mps_lib_assert_fail" title="mps_lib_assert_fail"><tt class="xref c c-func docutils literal"><span class="pre">mps_lib_assert_fail()</span></tt></a> for assertions). Should this be
|
|
documented to reserve the option of using it, or should it be
|
|
left out?</p>
|
|
<p>Similar question for <a class="reference internal" href="topic/plinth.html#mps_lib_get_stdout" title="mps_lib_get_stdout"><tt class="xref c c-func docutils literal"><span class="pre">mps_lib_get_stdout()</span></tt></a>: it’s used, but
|
|
only by the “diagnostic” code which has no public interface.</p>
|
|
<p><em>Action:</em> Keep <tt class="docutils literal"><span class="pre">stderr</span></tt> documented. Add a note that it’s not used
|
|
but for possible future use. Same thing about <tt class="docutils literal"><span class="pre">stdout</span></tt>.</p>
|
|
</li>
|
|
<li><p class="first">What’s the purpose of <tt class="docutils literal"><span class="pre">mps_SEH_filter</span></tt> and <tt class="docutils literal"><span class="pre">mps_SEH_handler</span></tt>?
|
|
Do they need to be documented?</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003349/">job003349</a>.</p>
|
|
</li>
|
|
<li><p class="first">What’s the use case for AMS? It’s suitable when you have blocks
|
|
that need to be automatically managed but can’t be moved. But
|
|
when does this happen? If foreign code maintains remembers their
|
|
location then it seems unlikely that they can be automatically
|
|
managed (how can these foreign references keep the blocks
|
|
alive?).</p>
|
|
<p><em>Answer:</em> It’s useful for a step in an integration because its
|
|
automatic but non-moving. But not ready for production: best to
|
|
plan to switch to AMC later on. Could be developed into a more
|
|
solid mark-and-sweep pool. Contact us.</p>
|
|
</li>
|
|
<li><p class="first">Does AMS use protection? I see that it calls <tt class="docutils literal"><span class="pre">ShieldExpose</span></tt> and
|
|
<tt class="docutils literal"><span class="pre">ShieldCover</span></tt> when calling the format’s skip method, but not
|
|
otherwise (e.g. when calling the format’s scan method). If it
|
|
does I need to update the pool choice algorithm.</p>
|
|
<p>Similar question for SNC? It calls <tt class="docutils literal"><span class="pre">ShieldExpose</span></tt> and
|
|
<tt class="docutils literal"><span class="pre">ShieldCover</span></tt> when calling the format’s pad method, but not
|
|
otherwise.</p>
|
|
<p><em>Answer:</em> The rule is “if it needs to be scanned, either it gets
|
|
scanned atomically on flip, or else it gets read-protected”. So
|
|
objects in both of these pools get protected.</p>
|
|
</li>
|
|
<li><p class="first">It seems possible that MV should not be used. What should I say
|
|
about this? Should we remove MV from the documentation
|
|
altogether.</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003350/">job003350</a>.</p>
|
|
</li>
|
|
<li><p class="first">What does the “No Checking” in “Stack No Checking” refer to?</p>
|
|
<p><em>Action:</em> Added to <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003344/">job003344</a>. Deprecated SNC.</p>
|
|
</li>
|
|
<li><p class="first">The hash table implementation is a bit rubbish: it waits until
|
|
the table is completely full before rehashing. Should ensure that
|
|
it never gets more than 50% full. Also the constructor should be
|
|
called <tt class="docutils literal"><span class="pre">make-eq-hashtable</span></tt> following R6RS.</p>
|
|
</li>
|
|
<li><p class="first">It seems a shame that MVT doesn’t support <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> as
|
|
this would be fairly trivial via an internal <a class="reference internal" href="glossary/a.html#term-allocation-point"><em class="xref std std-term">allocation
|
|
point</em></a>.</p>
|
|
<p><em>Action:</em> added to <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003350/">job003350</a>.</p>
|
|
</li>
|
|
<li><p class="first">Document MFS. Explain how it works (putting link in the free
|
|
block) and how this is unlike other pools.</p>
|
|
</li>
|
|
<li><p class="first">Do we support instruction emulation on x86-64? DL says that it’s
|
|
not in yet. What about OS X?</p>
|
|
<p><em>Action:</em> made <a class="reference external" href="https://info.ravenbrook.com/project/mps/issue/job003352/">job003352</a>.</p>
|
|
</li>
|
|
<li><p class="first">Weakness: how to detect splatting. (In scan.) Cope with NULL. Do
|
|
all references get splatted at the same time?</p>
|
|
<p><em>Action:</em> created <a class="reference internal" href="topic/weak.html#topic-weak"><em>Weak references</em></a>.</p>
|
|
</li>
|
|
<li><p class="first">Document the purpose of AWL and explain that it’s for OpenDylan.
|
|
“If you require more general implementation of weakness, contact
|
|
us.”</p>
|
|
<p><em>Action:</em> see <a class="reference internal" href="pool/awl.html#pool-awl"><em>AWL (Automatic Weak Linked)</em></a>.</p>
|
|
</li>
|
|
<li><p class="first">In AWL, what are the restrictions on the dependent object? Must
|
|
it be another object in AWL? What are we allowed to do with it?
|
|
What state will the object be in when we look at it? Does it have
|
|
to be fixed?</p>
|
|
<p><em>Answer:</em> better not be in a moving pool (otherwise might point
|
|
to forwarding object). You can fix it, but the fixed-up reference
|
|
won’t necessarily be exposed. Let’s document, “dependent object
|
|
must be in a non-moving pool, or in memory not managed by the
|
|
MPS.” (Should fix the dependent object; that may result in the
|
|
reference being splatted if the dependent object died.)</p>
|
|
</li>
|
|
<li><p class="first">Can you use the same generation chain with more than one pool?</p>
|
|
<p><em>Answer:</em> not only can you do this, but you ought to.</p>
|
|
</li>
|
|
</ol>
|
|
</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="#">To do</a><ul>
|
|
<li><a class="reference internal" href="#outstanding">Outstanding</a></li>
|
|
<li><a class="reference internal" href="#complete">Complete</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="contact.html"
|
|
title="previous chapter">Contact us</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="contact.html" title="Contact us"
|
|
>previous</a> |</li>
|
|
<li><a href="index.html">Memory Pool System 1.111.0 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer">
|
|
© <a href="copyright.html">Copyright</a> 2012, Ravenbrook Limited.
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |