1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 09:20:54 -08:00
emacs/mps/manual/wiki/modes.html
Richard Kistruck 7d853b8bd1 Mps wiki: modes: separate recommended and potential modes of use.
(plus rewording tweak to index)

Copied from Perforce
 Change: 159370
 ServerID: perforce.ravenbrook.com
2006-06-22 13:45:34 +01:00

196 lines
7.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>MPS Wiki: Modes of use of MPS</title>
<style type = "text/css">
<!--
div.banner {text-align:center}
dt {font-weight:bold}
-->
</style>
</head>
<body>
<div class="banner">
<p>
<a href="/">Ravenbrook</a>
/ <a href="/project/">Projects</a>
/ <a href="/project/mps/">Memory Pool System</a>
/ <a href="/project/mps/master/">Master Product Sources</a>
/ <a href="/project/mps/master/manual/">Manuals</a>
/ <a href="/project/mps/master/manual/wiki/">Wiki</a>
</p>
<p><i><a href="/project/mps/">Memory Pool System Project</a></i></p>
<hr />
<h1>MPS Wiki: Modes of use of MPS</h1>
<address>
<a href="mailto:rhsk@ravenbrook.com">Richard Kistruck</a>,
<a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>,
2006-06-15
</address>
</div>
<p> This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers. </p>
<p><strong>Warning: this document is young, and does not represent consensus.</strong> RHSK 2006-06-16.</p>
<h2>Recommended modes of use of MPS:</h2>
<p>The recommended modes of use, currently, are:</p>
<ul>
<li>.manual.mps-friendly</li>
<li>.ambiguous-workspace</li>
</ul>
<h2>Potential modes of use of MPS:</h2>
<dl>
<dt>.manual:</dt>
<dd>
<p>= no collection</p>
<dl>
<dt>.manual.malloc:</dt>
<dd>pure malloc/free replacement</dd>
<dt>.manual.mps-friendly:</dt>
<dd>an MPS-friendly interface: ap, SAC, etc</dd>
<dt>.manual.c++:</dt>
<dd>C++ friendly (not sure what this involves)</dd>
<dt>.manual.stl:</dt>
<dd>packaged as allocator for a C++ STL (Standard Template
Library) allocator</dd>
</dl>
</dd>
<dt>.freeless:</dt>
<dd>
<p>= malloc, with free a no-op</p>
<p>Probably formatless and fully ambig (Boehm-like).</p>
</dd>
<dt>.attachable:</dt>
<dd>
<p>(for .manual and .freeless) attach without source code changes,
or without a re-compile, or without a re-link,
or even without stopping mutator?</p>
</dd>
<dt><a id="unmanaged-workspace">.unmanaged-workspace:</a></dt>
<dd>
<p>= workspace (eg. registers and stack) is not scanned</p>
<p>This should be the simplest, but surprisingly it
doesn't seem to be well defined -- the MPS seems to lack
the necessary protocols for it!</p>
<p>(The only current protocol for unmanaged objects
is when they are under construction in allocation points).</p>
<p>For further discussion, see
<a href="unmanaged.html">issues with unmanaged workspace</a>.</p>
<p>The simplest starting point would probably be:
formatted, exact, non-incremental, and single-threaded.
(No protection, no stack or register scanner).
This is fine for:</p>
<ul>
<li> adding GC to part of bigger application;</li>
<li> implementing a simple language in C.</li>
</ul>
<p>This is what the SC integration wants.</p>
<p>Even when we define the necessary protocols, we're not
sure what the limits will be. Multi-threaded might
be very hard.</p>
</dd>
<dt>.ambiguous-workspace:</dt>
<dd>
<p>= all workspace (eg. registers and stack)
is scanned ambiguously,
with the exception of objects under construction
in allocation points, which are unmanaged but guarded.</p>
<p>This is our Dylan-like bread and butter:
incremental, generational, mostly copying,
formatted, ambiguous reg+stack,
supports foreign code, multi-threaded.
And we do location-dependency, weakness, finalization, ...</p>
</dd>
<dt>.exact-workspace:</dt>
<dd>
<p>= all workspace (eg. registers and stack)
is scanned exactly
(except objects under construction in allocation points)</p>
<p>Might be useful for someone writing their own compiler.
You wouldn't want to write this code in C.</p>
</dd>
</dl>
<h2><a id="section-B" name="section-B">B. Document History</a></h2>
<pre>
2006-06-15 RHSK Created.
2006-06-15 RHSK Modes of use; Types of object; Types of reference.
2006-06-16 RHSK Objects, cells, and references; Using unmanaged workspace
2006-06-20 RHSK Tidy and clarify. False aborts in guarded protocols.
2006-06-21 RHSK Move unmanaged workspace discussion to its own article.
2006-06-22 RHSK Separate recommended and potential modes of use.
</pre>
<h2><a id="section-C" name="section-C">C. Copyright and License</a></h2>
<p> This document is copyright &copy; 2006 <a href="http://www.ravenbrook.com/">Ravenbrook Limited</a>. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options. </p>
<p> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: </p>
<ol>
<li> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. </li>
<li> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. </li>
<li> Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs. </li>
</ol>
<p> <strong> This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. </strong> </p>
<hr />
<div class="banner">
<p><code>$Id$</code></p>
<p>
<a href="/">Ravenbrook</a>
/ <a href="/project/">Projects</a>
/ <a href="/project/mps/">Memory Pool System</a>
/ <a href="/project/mps/master/">Master Product Sources</a>
/ <a href="/project/mps/master/manual/">Manuals</a>
/ <a href="/project/mps/master/manual/wiki/">Wiki</a>
</p>
</div>
</body>
</html>