This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.
Terms are marked as being applicable in the following scopes:
Note: often an mps.h term has a related (but not exactly corresponding) internal term. The distinction can be critical.
This memory will be used for client objects. There are two interfaces: a high-level "segment" interface, and a simpler "arena memory" interface.
= a contiguous piece of memory of arbitrary size, with associated properties for participating in garbage collection (see SegStruct).
A pool may call SegAlloc() to request a segment from the arena. The segment is the unit of pool-to-pool and pool-to-MPM interaction for GC.
Design: design/seg.
Interface: SegAlloc() et al in mpm.h.
Historical note: before 'sunset on segments' (1999-11-18, change 21000) a segment was a VM page.
= a contiguous piece of memory of arbitrary size, returned by ArenaAlloc()
A pool may call ArenaAlloc() to request raw memory from the arena. This is a simpler interface than segments, suitable for simple pools that do not participate in garbage collection, pools used internally by the MPM, etc.
(Note: this ArenaAlloc() interface is sometimes called the "tract" interface).
This memory will be used for the pool's administrative datastructures, such as allocation tables.
Pools use ControlAlloc() and ControlFree() to obtain or free control memory.
See tract.c.
= a contiguous (I think) piece of address space that has been reserved (I think) by the arena
arena->primary points to the arena's first chunk
Other terms:
RING_FOR
macro visits all Child nodes.
Note: when a node (RingStruct) appears in a larger structure,
there is (alas) no indication whether it is the parent node,
or a child node.
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). 2006-08-14 RHSK Pieces of memory: chunk, segment, tract, page 2012-10-18 GDR Removed external terms (now in MPS glossary proper)
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:
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.