From 59d4666be58df23ec7d89216c2cac51762ff845d Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Wed, 2 Aug 2006 11:08:27 +0100 Subject: [PATCH] Mps wiki: pool_classes: lo is for foreign code, for leaf-only use amcz, how to choose the right pool class. glossary: foreign code. Copied from Perforce Change: 159893 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/glossary.html | 19 +++++++++++++- mps/manual/wiki/pool_classes.html | 43 ++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/mps/manual/wiki/glossary.html b/mps/manual/wiki/glossary.html index ca9ac0e3c06..7291412aefd 100644 --- a/mps/manual/wiki/glossary.html +++ b/mps/manual/wiki/glossary.html @@ -88,9 +88,25 @@

Other terms:

+
Foreign code (mps.h)
+
From the MPS client's point of view, foreign code is + external code (outside the client and MPS), which is not + aware of and does not cooperate with the MPS. + Examples include the operating system, graphics libraries, + etc. + Before the client passes MPS memory references to foreign + code, it must ensure that the memory is not going to be moved, + collected, or + protected by the MPS. + Some pool classes (eg. + mps_class_lo + ) are specially + designed for this. +
+
Format (mps.h)
A collection of client-implemented Format Methods, - which MPS uses to ask questions about objects. + which MPS uses to ask the client questions about objects. See GC.
Attr (internal)
@@ -116,6 +132,7 @@ 2006-06-06 RHSK Created. 2006-06-21 RHSK Scope of terms; client/mutator, ap/buffer. 2006-07-03 RHSK Ring. + 2006-08-02 RHSK Foreign code. Format (clarify). diff --git a/mps/manual/wiki/pool_classes.html b/mps/manual/wiki/pool_classes.html index 083cc7562d5..79b13572315 100644 --- a/mps/manual/wiki/pool_classes.html +++ b/mps/manual/wiki/pool_classes.html @@ -42,18 +42,47 @@

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

-

Some notes about MPS pool classes

+

How to choose the right MPS pool class

-

A useful survey from 1998: +

We would like a 'map' from a client's requirements to the + recommended pool class:

+
+Do you need garbage collection?
+Do you have objects with no references in them?
+Do you need to pass buffers to system calls?
+etc etc
+You need mps_class_lo.
+
+ +

For now, the closest we have to this is a survey from 1998 that + still contains confidential material: guide.mps.pool-classes by RIT .

-

Other notes:

+ +

Some notes about MPS pool classes

+
-
mps_class_lo
+
mps_class_lo
-

Leaf Only pool class, for objects that contain no references. - Unit test: locv.c.

+

Leaf Only pool class (for objects that contain no references) + that does not use memory protection. + Unit test: locv.c. RefMan: -undocumented-.

+

This pool class should really be called "flat data + that needs to be accessed by + foreign code" + -- that's what it was developed for. If you want to allocate + a buffer to pass to an operating system I/O call, this + is probably the pool class you should use. + [Conversation with DRJ, 2006-07].

+

For a general-purpose leaf-only pool, + you probably want AMCZ.

+
+ +
mps_class_amcz
+
+

A variant of AMC for objects of Zero rank, ie. + leaf-only objects (objects that contain no references).

mps_class_awl
@@ -185,6 +214,8 @@ NULL. 2006-06-02 RHSK Created. 2006-06-23 RHSK Link to RIT's 1998 guide.mps.pool-classes. 2006-06-28 RHSK Notes on AWL dependent object and scan method. + 2006-08-02 RHSK LO is for foreign code; for leaf-only use AMCZ. + How to choose the right pool class.