This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

Warning: this document is young, and does not represent consensus. RHSK 2006-06-16.

Recommended modes of use of MPS:

The recommended modes of use, currently, are:

Potential modes of use of MPS:

.manual:

= no collection

.manual.malloc:
pure malloc/free replacement
.manual.mps-friendly:
an MPS-friendly interface: ap, SAC, etc
.manual.c++:
C++ friendly (not sure what this involves)
.manual.stl:
packaged as allocator for a C++ STL (Standard Template Library) allocator
.freeless:

= malloc, with free a no-op

Probably formatless and fully ambig (Boehm-like).

.attachable:

(for .manual and .freeless) attach without source code changes, or without a re-compile, or without a re-link, or even without stopping mutator?

.unmanaged-workspace:

= workspace (eg. registers and stack) is not scanned

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!

(The only current protocol for unmanaged objects is when they are under construction in allocation points).

For further discussion, see issues with unmanaged workspace.

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:

This is what the SC integration wants.

Even when we define the necessary protocols, we're not sure what the limits will be. Multi-threaded might be very hard.

.ambiguous-workspace:

= all workspace (eg. registers and stack) is scanned ambiguously, with the exception of objects under construction in allocation points, which are unmanaged but guarded.

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, ...

.exact-workspace:

= all workspace (eg. registers and stack) is scanned exactly (except objects under construction in allocation points)

Might be useful for someone writing their own compiler. You wouldn't want to write this code in C.

B. Document History

  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.

C. Copyright and License

This document is copyright © 2006 Ravenbrook Limited. 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 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.

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.