From 49dcec4d8ff388d2b77f2c4b02a3a5dc5db2c67b Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Fri, 23 Jun 2006 16:20:20 +0100 Subject: [PATCH] Mps wiki: split ap internals into its own article Copied from Perforce Change: 159392 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/apguide.html | 395 ++------------------------ mps/manual/wiki/apinternals.html | 456 +++++++++++++++++++++++++++++++ mps/manual/wiki/index.html | 9 +- 3 files changed, 489 insertions(+), 371 deletions(-) create mode 100644 mps/manual/wiki/apinternals.html diff --git a/mps/manual/wiki/apguide.html b/mps/manual/wiki/apguide.html index 223b3363bd3..7cadc81b7d2 100644 --- a/mps/manual/wiki/apguide.html +++ b/mps/manual/wiki/apguide.html @@ -42,16 +42,6 @@

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

-

Contents:

- - - - -

Allocation Points -- User's Guide

-

These notes on Allocation Points were written by RHSK between 2006-06-07 and 2006-06-22, following research and discussion with RB and NB. @@ -69,7 +59,7 @@ references to a failed new-object, before it calls mps_ap_trip, is suspected to be new. RHSK 2006-06-13]

-

Introduction

+

Introduction

Allocation points are an MPS protocol that the client uses to allocate memory with low overhead, and low synchronization @@ -94,19 +84,12 @@ be a root that is ambiguously scanned, using mps_root_create_reg and passing the mps_stack_scan_ambig function to it. This is the simplest way to write a client. - Other scenarios are possible, but are not yet documented here.

+ Other scenarios are possible, but + their implications for correct Allocation Point use + are not yet documented here.

-

- Note: This document explains the protocol in terms of the - pre-packaged macros - mps_reserve and mps_commit, - but this is a simplification. - The MPS allocation point protocol is actually designed as - binary protocol, defined at the level of atomic machine operations. - The precise specification of the binary protocol is beyond the - scope of this document.

- -

The rest of this Allocation Points User's Guide contains the following sub-sections:

+

The rest of this Allocation Points User's Guide contains the following + sections:

-

Creating and destroying allocation points

+

Creating and destroying allocation points

To create an allocation point in a pool, call mps_ap_create. @@ -131,7 +114,7 @@

Destroy an allocation point with mps_ap_destroy.

-

Overview of two-step allocation

+

Overview of two-step allocation

When the client is building (creating and formatting) a new object, you can think of it as being 'in a race' with the MPS. @@ -231,7 +214,7 @@ fail_make_object: detail.

-

The graph of managed references

+

The graph of managed references

The MPS is a moving garbage collector: it supports preserve-by-copying pools, whose objects are 'mobile'. @@ -267,7 +250,7 @@ fail_make_object: reference. -

mps_reserve

+

mps_reserve

Call mps_reserve, passing the size of the new object you wish to create. @@ -311,7 +294,7 @@ fail_make_object: questions about the new object. -

Building the object

+

Building the object

The client will typically do all these things:

+

Internal or arcane:

+

Not much use yet: