1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

Propagate changes from scheme-after.c to scheme.c; the former is no longer needed.

Convert license.txt and built.txt to reStructuredText and include them directly in the manual.

Copied from Perforce
 Change: 179957
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2012-10-19 11:26:25 +01:00
parent 6ff65512e9
commit f859353280
12 changed files with 177 additions and 3332 deletions

View file

@ -16,20 +16,15 @@
* (define (church n f a) (if (eqv? n 0) a (church (- n 1) f (f a))))
* (church 1000 triangle 0)
*
* This won't produce interesting results but it will cause a garbage
* This won't produce interesting results but it will cause garbage
* collection cycles. Note that there's never any waiting for the MPS.
* THAT'S THE POINT.
*
* To find the code that's particularly related to the MPS, search for %%MPS.
*
* By the way, this interpreter originally just used `malloc` to allocate
* and had no garbage collector. Adapting it to use the MPS took
* approximately two hours (for an MPS developer :).
*
*
* MPS TO DO LIST
* - make the symbol table weak to show how to use weak references
* - make Scheme ports finalized to show how to use finalization
* - add Scheme operators for talking to the MPS, forcing GC etc.
* - cross-references to documentation
* - make an mps_perror
@ -109,9 +104,10 @@ enum {
TYPE_PROMISE,
TYPE_CHARACTER,
TYPE_VECTOR,
TYPE_FWD2, /* two-word broken heart */
TYPE_FWD, /* three-words and up broken heart */
TYPE_PAD1 /* one-word padding object */
TYPE_FWD2, /* two-word forwarding object */
TYPE_FWD, /* three words and up forwarding object */
TYPE_PAD1, /* one-word padding object */
TYPE_PAD /* two words and up padding object */
};
typedef struct type_s {
@ -171,13 +167,13 @@ typedef struct vector_s {
} vector_s;
/* fwd, fwd2, pad1 -- MPS forwarding and padding objects %%MPS
/* fwd2, fwd, pad1, pad -- MPS forwarding and padding objects %%MPS
*
* These object types are here to satisfy the MPS Format Protocol
* for format variant "A". See [type mps_fmt_A_s in the reference
* manual](../../reference/index.html#mps_fmt_A_s).
*
* The MPS needs to be able to replace any object with forwarding object
* The MPS needs to be able to replace any object with a forwarding object
* or [broken heart](http://www.memorymanagement.org/glossary/b.html#broken.heart)
* and since the smallest normal object defined above is two words long,
* we have two kinds of forwarding objects: FWD2 is exactly two words
@ -187,8 +183,8 @@ typedef struct vector_s {
* The MPS needs to be able to pad out any area of memory that's a
* multiple of the pool alignment. We've chosen an single word alignment
* for this interpreter, so we have to have a special padding object, PAD1,
* for single words. For larger objects we can just use forwarding objects
* with NULL in their `fwd` fields. See `obj_isfwd` for details.
* for single words. For padding multiple words we use PAD objects with a
* size field.
*
* See obj_pad, obj_fwd etc. to see how these are used.
*/
@ -208,6 +204,11 @@ typedef struct pad1_s {
type_t type; /* TYPE_PAD1 */
} pad1_s;
typedef struct pad_s {
type_t type; /* TYPE_PAD */
size_t size; /* total size of this object */
} pad_s;
typedef union obj_u {
type_s type; /* one of TYPE_* */
@ -222,6 +223,7 @@ typedef union obj_u {
vector_s vector;
fwd2_s fwd2;
fwd_s fwd;
pad_s pad;
} obj_s;
@ -393,8 +395,10 @@ static void error(char *format, ...)
* protocol.
*/
#define ALIGNMENT sizeof(mps_word_t)
#define ALIGN(size) \
(((size) + sizeof(mps_word_t) - 1) & ~(sizeof(mps_word_t) - 1))
(((size) + ALIGNMENT - 1) & ~(ALIGNMENT - 1))
static obj_t make_pair(obj_t car, obj_t cdr)
{
@ -830,8 +834,8 @@ static void print(obj_t obj, unsigned depth, FILE *stream)
} break;
default:
assert(0);
abort();
assert(0);
abort();
}
}
@ -2543,6 +2547,9 @@ static mps_res_t obj_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit)
case TYPE_PAD1:
base = (char *)base + ALIGN(sizeof(pad1_s));
break;
case TYPE_PAD:
base = (char *)base + ALIGN(obj->pad.size);
break;
default:
assert(0);
fprintf(stderr, "Unexpected object on the heap\n");
@ -2604,6 +2611,9 @@ static mps_addr_t obj_skip(mps_addr_t base)
case TYPE_FWD:
base = (char *)base + ALIGN(obj->fwd.size);
break;
case TYPE_PAD:
base = (char *)base + ALIGN(obj->pad.size);
break;
case TYPE_PAD1:
base = (char *)base + ALIGN(sizeof(pad1_s));
break;
@ -2669,8 +2679,8 @@ static void obj_fwd(mps_addr_t old, mps_addr_t new)
* object that will be skipped by `obj_scan` or `obj_skip` but does
* nothing else. Because we've chosen to align to single words, we may
* have to pad a single word, so we have a special single-word padding
* object, `PAD1` for that purpose. Otherwise we can use forwarding
* objects with their `fwd` fields set to `NULL`.
* object, `PAD1` for that purpose. Otherwise we can use multi-word
* padding objects, `PAD`.
*/
static void obj_pad(mps_addr_t addr, size_t size)
@ -2679,31 +2689,13 @@ static void obj_pad(mps_addr_t addr, size_t size)
assert(size >= ALIGN(sizeof(pad1_s)));
if (size == ALIGN(sizeof(pad1_s))) {
obj->type.type = TYPE_PAD1;
} else if (size == ALIGN(sizeof(fwd2_s))) {
obj->type.type = TYPE_FWD2;
obj->fwd2.fwd = NULL;
} else {
obj->type.type = TYPE_FWD;
obj->fwd.fwd = NULL;
obj->fwd.size = size;
obj->type.type = TYPE_PAD;
obj->pad.size = size;
}
}
/* obj_copy -- object format copy method %%MPS
*
* The job of `obj_copy` is to make a copy of an object.
* TODO: Explain why this exists.
*/
static void obj_copy(mps_addr_t old, mps_addr_t new)
{
mps_addr_t limit = obj_skip(old);
size_t size = (char *)limit - (char *)old;
(void)memcpy(new, old, size);
}
/* obj_fmt_s -- object format parameter structure %%MPS
*
* This is simply a gathering of the object format methods and the chosen
@ -2711,10 +2703,10 @@ static void obj_copy(mps_addr_t old, mps_addr_t new)
*/
struct mps_fmt_A_s obj_fmt_s = {
sizeof(mps_word_t),
ALIGNMENT,
obj_scan,
obj_skip,
obj_copy,
NULL, /* Obsolete copy method */
obj_fwd,
obj_isfwd,
obj_pad
@ -2761,7 +2753,7 @@ static void mps_chat(void)
assert(b); /* we just checked there was one */
if (type == mps_message_type_gc_start()) {
printf("Collection %lu started.\n", (unsigned long)mps_collections(arena));
printf("Collection started.\n");
printf(" Why: %s\n", mps_message_gc_start_why(arena, message));
printf(" Clock: %lu\n", (unsigned long)mps_message_clock(arena, message));
@ -2907,7 +2899,14 @@ static void *start(void *p, size_t s)
/* obj_gen_params -- initial setup for generational GC %%MPS
*
* FIXME: explain this
* Each structure in this array describes one generation of objects. The
* two members are the capacity of the generation in kilobytes, and the
* mortality, the proportion of objects in the generation that you expect
* to survive a collection of that generation.
*
* 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.
*/
static mps_gen_param_s obj_gen_params[] = {

View file

@ -9,48 +9,50 @@ open source.
If the licensing terms aren't suitable for you (for example, you're
developing a closed-source commercial product or a compiler run-time
system) you can easily license the MPS under different terms from
Ravenbrook. Please write to us <mps-questions@ravenbrook.com> for more
information.
Ravenbrook. Please write to us at `<mps-questions@ravenbrook.com>`_
for more information.
The open source license for the MPS is the [Sleepycat License][] also
The open source license for the MPS is the `Sleepycat License`_ also
known as the "Berkeley Database License". This license is
[GPL compatible][] and [OSI approved][]. The MPS is "multi licensed" in
`GPL compatible`_ and `OSI approved`_. The MPS is "multi licensed" in
a manner similar to MySQL.
[Sleepycat License]: https://en.wikipedia.org/wiki/Sleepycat_License
[GPL compatible]: http://www.gnu.org/licenses/license-list.html
[OSI approved]: http://opensource.org/licenses/sleepycat
.. _Sleepycat License: https://en.wikipedia.org/wiki/Sleepycat_License
.. _GPL compatible: http://www.gnu.org/licenses/license-list.html
.. _OSI approved: http://opensource.org/licenses/sleepycat
License
-------
Copyright (C) 2001-2012 Ravenbrook Limited <http://www.ravenbrook.com/>.
Copyright © 20012012 `Ravenbrook Limited <http://www.ravenbrook.com/>`_.
All rights reserved. This is the open source license for the Memory
Pool System, but it is not the only one. Contact Ravenbrook
<mps-questions@ravenbrook.com> if you would like a different license.
Pool System, but it is not the only one. Contact Ravenbrook at
`<mps-questions@ravenbrook.com>`_ if you would like a different
license.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer.
2. 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.
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.
3. Redistributions in any form must be accompanied by information on how
to obtain complete source code for 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.
3. Redistributions in any form must be accompanied by information on
how to obtain complete source code for 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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@ -68,16 +70,12 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Exceptions
----------
### Open Dylan
**Open Dylan**
Software that makes use of the Memory Pool System only via the Dylan
programming language using the Open Dylan implementation and any
accompanying software is exempt from clause 3 of the license, provided
that the Dylan program is not providing memory management services. For
the avoidance of doubt, this exemption does not apply to software
directly using a copy of the Memory Pool System received as part of the
Open Dylan source code.
---
$Id$
Software that makes use of the Memory Pool System only via the Dylan
programming language using the Open Dylan implementation and any
accompanying software is exempt from clause 3 of the license, provided
that the Dylan program is not providing memory management services. For
the avoidance of doubt, this exemption does not apply to software
directly using a copy of the Memory Pool System received as part of the
Open Dylan source code.

View file

@ -1,6 +1,6 @@
Building the Memory Pool System
===============================
Richard Brooksby, Ravenbrook Limited, 2012-09-05
Introduction
------------
@ -23,41 +23,44 @@ The MPS also comes with Makefiles and IDE project files for building
libraries, tools, and tests. See "Building the MPS for development".
### Compiling for production
Compiling for production
........................
In the simplest case, you can compile the MPS to an object file with just:
In the simplest case, you can compile the MPS to an object file with just::
cc -c mps.c (Unix/Mac OS X)
cl /c mps.c (Windows)
This will build a "hot" variety (for production) object file for use
with "mps.h". You can greatly improve performance by allowing global
optimization, for example:
with ``mps.h``. You can greatly improve performance by allowing global
optimization, for example::
cc -O2 -c mps.c (Unix/Mac OS X)
cl /O2 /c mps.c (Windows)
### Compiling for debugging
Compiling for debugging
.......................
You can get a "cool" variety MPS (with more internal checking, for
debugging and development) with:
debugging and development) with::
cc -g -DCONFIG_VAR_COOL -c mps.c
cl /Zi /DCONFIG_VAR_COOL /c mps.c
### Optimizing for your object format
Optimizing for your object format
.................................
If you are using your own object format [ref?], you will also get
If you are using your own :term:`object format`, you will also get
improved performance by allowing the compiler to do global optimisations
between it and the MPS. So if your format implementation is in, say,
myformat.c, then you could make a file mymps.c containing
``myformat.c``, then you could make a file ``mymps.c`` containing::
#include "mps.c"
#include "myformat.c"
then
then::
cc -O2 -c mymps.c (Unix/Mac OS X)
cl /O2 /c mymps.c (Windows)
@ -65,17 +68,18 @@ then
This will get your format code inlined with the MPS garbage collector.
### Compiling without the C library
Compiling without the C library
...............................
If you're building the MPS for an environment without the standard C
library, you can exclude the "plinth" component of the MPS with
library, you can exclude the :ref:`topic-plinth` component of the MPS
with::
cc -DCONFIG_PLINTH_NONE -c mps.c
cl /Gs /DCONFIG_PLINTH_NONE /c mps.c
but you must then provide your own implementation of
[mpslib.h](../code/mps.h). You can base this on the ANSI plinth in
[mpsliban.c](../code/mpsliban.c).
but you must then provide your own implementation of ``mpslib.h``.
You can base this on the ANSI plinth in ``mpsliban.c``.
If you want to do anything beyond these simple cases, use the MPS build
as described in the section "Building the MPS for development" below.
@ -90,162 +94,117 @@ use the MPS build. This uses makefiles or Xcode projects. [Coming
soon, Microsoft Visual Studio solutions.]
### Prerequisites
Prerequisites
.............
For Unix-like platforms you will need the GNU Make tool. Some platforms
(such as Linux) have GNU Make as their default make tool. For others
you will need to get and install it. (It's available free from
<ftp://ftp.gnu.org/gnu/make/>.) On FreeBSD this can be done as root
with `pkg_add -r gmake`.
`<ftp://ftp.gnu.org/gnu/make/>`_.) On FreeBSD this can be done as root
with ``pkg_add -r gmake``.
On Windows platforms the NMAKE tool is used. This comes with Microsoft
Visual Studio C++ or the Microsoft Windows SDK.
On Mac OS X the MPS is built using Xcode, either by opening
[mps.xcodeproj](../code/mps.xcodeproj) with the Xcode app, or using the
command-line "xcodebuild" tool, installed from Xcode -> Preferences ->
Downloads -> Components -> Command Line Tools.
``mps.xcodeproj`` with the Xcode app, or using the command-line
"xcodebuild" tool, installed from Xcode → Preferences → Downloads →
Components → Command Line Tools.
### Platforms
Platforms
.........
The MPS uses a six character platform code to express a combination of
OS/CPU architecture/compiler toolchain. Each 6 character code breaks
down into three groups of two characters, like this:
The MPS uses a six-character platform code to express a combination of
operating system, CPU architecture, and compiler toolchain. Each
six-character code breaks down into three pairs of characters, like
this::
OSARCT
OSARCT
Where OS denotes the operating system, AR denotes the CPU architecture,
and CT denotes compiler toolchain. Here are the platforms that we
have regular access to and on which the MPS works well.
Where ``OS`` denotes the operating system, ``AR`` the CPU
architecture, and ``CT`` the compiler toolchain. Here are the
platforms that we have regular access to and on which the MPS works
well:
Makefile OS Architecture Compiler
fri3gc.gmk FreeBSD Intel i386 GCC
fri6gc.gmk FreeBSD Intel x86_64 GCC
lii3gc.gmk Linux Intel i386 GCC
lii6gc.gmk Linux Intel x86_64 GCC
mps.xcodeproj Mac OS X i386 + x86_64 Clang
xci3gc.gmk Mac OS X i386 GCC (legacy)
w3i3mv.nmk Windows Intel i386 Microsoft C
w3i6mv.nmk Windows Intel x86_64 Microsoft C
========= ============= ============ =================
OS Architecture Compiler Makefile
========= ============= ============ =================
FreeBSD Intel i386 GCC ``fri3gc.gmk``
FreeBSD Intel x86_64 GCC ``fri6gc.gmk``
Linux Intel i386 GCC ``lii3gc.gmk``
Linux Intel x86_64 GCC ``lii6gc.gmk``
Mac OS X i386 + x86_64 Clang ``mps.xcodeproj``
Mac OS X i386 GCC (legacy) ``xci3gc.gmk``
Windows Intel i386 Microsoft C ``w3i3mv.nmk``
Windows Intel x86_64 Microsoft C ``w3i6mv.nmk``
========= ============= ============ =================
Historically the MPS has worked on a much wider variety of platforms and
still could: IRIX, OSF/1 (Tru64), Solaris, SunOS, Classic Mac OS; MIPS,
PowerPC, ALPHA, SPARC v8, SPARC v9; Metrowerks Codewarrior, SunPro C,
Digital C, EGCS. If you are interested in support on any of these
platforms or any new platforms, please contact Ravenbrook
<mps-questions@ravenbrook.com>.
Historically, the MPS worked on a much wider variety of platforms, and
still could: IRIX, OSF/1 (Tru64), Solaris, SunOS, Classic Mac OS;
MIPS, PowerPC, ALPHA, SPARC v8, SPARC v9; Metrowerks Codewarrior,
SunPro C, Digital C, EGCS. If you are interested in support on any of
these platforms or any new platforms, please contact Ravenbrook at
`mps-questions@ravenbrook.com <mailto:mps-questions@ravenbrook.com>`_.
### Running make
Running make
............
To build all MPS targets on Unix-like platforms, change to the "code"
directory and type:
To build all MPS targets on Unix-like platforms, change to the ``code``
directory and type::
make -f <makefile>
where "make" is the command for GNU Make. (Sometimes this will be
"gmake" or "gnumake".)
where ``make`` is the command for GNU Make. (Sometimes this will be
``gmake`` or ``gnumake``.)
To build just one target, type:
To build just one target, type::
make -f <makefile> <target>
To build a restricted set of targets for just one variety, type:
To build a restricted set of targets for just one variety, type::
make -f <makefile> 'VARIETY=<variety>' <target>
For example, to build just the "cool" variety of the "amcss" test on
FreeBSD:
For example, to build just the "cool" variety of the ``amcss`` test on
FreeBSD::
gmake -f fri3gc.gmk VARIETY=cool amcss
On Windows platforms you need to run the "Visual Studio Command Prompt"
from the Start menu. Then type:
from the Start menu. Then type::
nmake /f w3i3mv.nmk (32-bit)
nmake /f w3i6mv.nmk (64-bit)
You will need to switch your build environment between 32-bit and 64-bit
using Microsoft's `setenv` command, e.g. `setenv /x86` or `setenv /x64`.
You will need to switch your build environment between 32-bit and
64-bit using Microsoft's ``setenv`` command, for example, ``setenv
/x86`` or ``setenv /x64``.
To build just one target, type:
To build just one target, type::
nmake /f w3i3mv.nmk <target>
On Mac OS X, you can build from the command line with:
On Mac OS X, you can build from the command line with::
xcodebuild
On most platforms, the output of the build goes to a directory named
after the platform (e.g. `fri3gc`) so that you can share the source tree
across platforms. On Mac OS X the output goes in a directory called
`xc`. Building generates "mps.a" or "mps.lib" or equivalent, a
library of object code which you can link with your application, subject
to the MPS licensing conditions (see [license.txt](../license.txt). It
also generates a number of test programs, such as "amcss" (a stress test
for the Automatic Mostly-Copying pool class) and tools such as
"eventcnv" (for decoding telemetry logs).
after the platform (e.g. ``fri3gc``) so that you can share the source
tree across platforms. On Mac OS X the output goes in a directory
called ``xc``. Building generates ``mps.a`` or ``mps.lib`` or
equivalent, a library of object code which you can link with your
application, subject to the :ref:`MPS licensing conditions <license>`.
It also generates a number of test programs, such as ``amcss`` (a
stress test for the Automatic Mostly-Copying pool class) and tools
such as ``eventcnv`` (for decoding telemetry logs).
Installing the Memory Pool System
---------------------------------
There is currently no automatic way to "install" the MPS, such as a
`make install` command. You can do this by copying the libraries built
by the make to, for example, `/usr/local/lib`, and all the headers
beginning with "mps" to `/usr/local/include`.
Document History
----------------
- 2012-09-05 RB First draft ready for version 1.110, based partly on
the old readme, which had grown far too long.
- 2012-09-19 RB Tidying up a few points after feedback from GDR.
Copyright and Licence
---------------------
Copyright (C) 2001-2012 Ravenbrook Limited. All rights reserved.
<http://www.ravenbrook.com/>. This is an open source license. Contact
Ravenbrook for commercial licensing options.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. 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.
3. Redistributions in any form must be accompanied by information on how
to obtain complete source code for 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.
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.
$Id$
``make install`` command. You can do this by copying the libraries built
by the make to, for example, ``/usr/local/lib``, and all the headers
beginning with ``mps`` to ``/usr/local/include``.

View file

@ -1,44 +1,3 @@
*********************
Copyright and licence
*********************
.. _license:
The Memory Pool System documentation is copyright © 19972012 by
`Ravenbrook Limited <http://ravenbrook.com>`_. All rights reserved.
This is an open source license. Contact Ravenbrook for commercial
licensing options.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. 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.
3. Redistributions in any form must be accompanied by information on
how to obtain complete source code for 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.
**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.**
.. include:: ../../license.txt

View file

@ -0,0 +1,3 @@
.. _guide-build:
.. include:: ../../build.txt

View file

@ -2,9 +2,8 @@
.. _guide-debug:
======================
Debugging with the MPS
======================
Debugging with the Memory Pool System
=====================================
* Messages.

View file

@ -1,11 +1,12 @@
**********
User guide
**********
.. _guide:
Guide
*****
.. toctree::
:numbered:
install
build
overview
lang
perf

View file

@ -1,6 +0,0 @@
.. _guide-install:
==================
Installing the MPS
==================

View file

@ -2,9 +2,8 @@
.. _guide-lang:
==========================================
Garbage collecting a language with the MPS
==========================================
Garbage collecting a language with the Memory Pool System
=========================================================
Have you written the lexer, parser, code generator and the runtime
system for your programming language, and come to the realization that
@ -16,11 +15,10 @@ moving, generational garbage collection to the runtime system for a
programming language.
I'm assuming that you've downloaded and built the MPS (see the chapter
:ref:`guide-install`), and that you are familiar with the overall
:ref:`guide-build`), and that you are familiar with the overall
architecture of the MPS (see the chapter :ref:`guide-overview`).
----------------------
The Scheme interpreter
----------------------
@ -115,7 +113,6 @@ are :term:`dead` before their memory can be :term:`reclaimed
<reclaim>`. And that task falls to the :term:`garbage collector`.
-----------------------
Choosing an arena class
-----------------------
@ -180,7 +177,6 @@ some other value if it failed.
:ref:`topic-arena`.
---------------------
Choosing a pool class
---------------------
@ -212,7 +208,6 @@ these features of the MPS.
classes.
-----------------------
Describing your objects
-----------------------
@ -624,7 +619,6 @@ code must be added to ``obj_scan`` and ``obj_skip``::
:ref:`topic-format`.
-----------------
Generation chains
-----------------
@ -660,7 +654,6 @@ interpreter::
if (res != MPS_RES_OK) error("Couldn't create obj chain");
-----------------
Creating the pool
-----------------
@ -710,7 +703,6 @@ And finally the :term:`pool`::
if (res != MPS_RES_OK) error("Couldn't create obj pool");
-----
Roots
-----
@ -908,7 +900,6 @@ changes size::
.. _guide-lang-threads:
-------
Threads
-------
@ -1009,7 +1000,6 @@ it now must be organized like this::
.. _guide-lang-allocation:
----------
Allocation
----------
@ -1120,7 +1110,6 @@ we have to initialize the object again (most conveniently done via a
:ref:`topic-allocation`.
-----------------------
Maintaining consistency
-----------------------
@ -1162,7 +1151,6 @@ with tactics for tracking down the causes, appear in the chapter
:ref:`guide-debug`.
----------
Tidying up
----------
@ -1190,8 +1178,6 @@ Here's the tear-down code from the Scheme interpreter::
mps_arena_destroy(arena);
----------
What next?
----------

View file

@ -1,7 +1,6 @@
.. _guide-overview:
===================
Overview of the MPS
===================
Overview of the Memory Pool System
==================================

View file

@ -2,8 +2,7 @@
.. _guide-perf:
==============================
Tuning the MPS for performance
==============================
Tuning the Memory Pool System for performance
=============================================
See <https://info.ravenbrook.com/project/mps/doc/2002-06-18/obsolete-mminfo/mminfo/strategy/lisp-machine/>

File diff suppressed because it is too large Load diff