Index to source code

External MPS interface

The external MPS interface consists of header files that the client program is expected to include, plus the single-file source code (mps.c). See design.mps.interface-c.

File

Description

mps.h

Public MPS interface.

mps.c

Single-file source code. See Building the Memory Pool System.

mpsacl.h

Client arenas external interface.

mpsavm.h

Virtual memory arenas external interface.

mpscamc.h

AMC (Automatic Mostly-Copying) pool class external interface.

mpscams.h

AMS (Automatic Mark and Sweep) pool class external interface.

mpscawl.h

AWL (Automatic Weak Linked) pool class external interface.

mpsclo.h

LO (Leaf Object) pool class external interface.

mpscmfs.h

MFS (Manual Fixed Small) pool class external interface.

mpscmv.h

MV (Manual Variable) pool class external interface.

mpscmv2.h

Former (deprecated) MVT (Manual Variable Temporal) pool class interface.

mpscmvff.h

MVFF (Manual Variable First Fit) pool class external interface.

mpscmvt.h

MVT (Manual Variable Temporal) pool class external interface.

mpscsnc.h

SNC (Stack No Checking) pool class external interface.

mpsio.h

I/O module interface.

mpslib.h

Library module interface.

Plinth

The plinth provides an interface between the MPS and the execution environment, to help support freestanding implementations. See Plinth.

File

Description

mpsioan.c

I/O module for “ANSI” (hosted) environments.

mpsliban.c

Library module for “ANSI” (hosted) environments.

Configuration

These header files provide platform-specific constants, type declarations, and macros. See Porting the MPS and design.mps.config.

File

Description

clock.h

Fast high-resolution clocks.

config.h

MPS configuration header.

mpstd.h

Target detection header.

Core MPS

File

Description

abq.c

Fixed-length queue implementation. See design.mps.abq.

abq.h

Fixed-length queue interface. See design.mps.abq.

arena.c

Arena implementation. See design.mps.arena.

arenacl.c

Client arenas implementation.

arenavm.c

Virtual memory arenas implementation.

arg.c

Keyword arguments implementation.

arg.h

Keyword arguments interface.

boot.c

Bootstrap allocator implementation. See design.mps.bootstrap.

boot.h

Bootstrap allocator interface. See design.mps.bootstrap.

bt.c

Bit table implementation. See design.mps.bt.

bt.h

Bit table interface. See design.mps.bt.

buffer.c

Buffer implementation. See design.mps.buffer.

cbs.c

Coalescing block implementation. See design.mps.cbs.

cbs.h

Coalescing block interface. See design.mps.cbs.

check.h

Assertion interface. See design.mps.check.

dbgpool.c

Debugging pools implementation.

dbgpool.h

Debugging pools interface.

dbgpooli.c

Debugging pools external interface.

event.c

Telemetry implementation.

event.h

Telemetry interface (internal).

eventcom.h

Telemetry interface (auxiliary programs).

eventdef.h

Telemetry event definitions.

failover.c

Fail-over allocator implementation. See design.mps.failover.

failover.h

Fail-over allocator interface. See design.mps.failover.

format.c

Object formats implementation.

freelist.c

Freelist allocator implementation. See design.mps.freelist.

freelist.h

Freelist allocator interface. See design.mps.freelist.

global.c

Global arena implementation.

land.c

Land implementation. See design.mps.land.

ld.c

Location dependency implementation.

locus.c

Locus manager implementation. See design.mps.locus.

locus.h

Locus manager interface. See design.mps.locus.

message.c

Messages implementation.

meter.c

Debugging accumulator implementation.

meter.h

Debugging accumulator interface.

misc.h

Miscellaneous constant and macro definitions.

mpm.c

Miscellaneous support functions. See design.mps.writef.

mpm.h

Core MPS interface. (“MPM” = “Memory Pool Manager”)

mpmst.h

Core data structure declarations.

mpmtypes.h

Core type declarations.

mpsi.c

External interface implementation. See design.mps.interface-c.

mpsiw3.c

Additional external interface implementation for Windows.

mpswin.h

Wrapper for windows.h.

nailboard.c

Nailboard implementation. See design.mps.nailboard.

nailboard.h

Nailboard interface. See design.mps.nailboard.

policy.c

Collection policy decisions. See design.mps.strategy.

pool.c

Pool implementation. See design.mps.pool.

poolabs.c

Abstract pool classes.

poolmrg.c

Manual Rank Guardian pool implementation. See design.mps.poolmrg.

poolmrg.h

Manual Rank Guardian pool interface. See design.mps.poolmrg.

protocol.c

Inheritance protocol implementation. See design.mps.protocol.

protocol.h

Inheritance protocol interface. See design.mps.protocol.

range.c

Address ranges implementation. See design.mps.range.

range.h

Address ranges interface. See design.mps.range.

ref.c

Ranks and zones implementation.

ring.c

Ring implementation. See design.mps.ring.

ring.h

Ring interface. See design.mps.ring.

root.c

Roots implementation.

sa.c

Sparse array implementation.

sa.h

Sparse array interface.

sac.c

Segregated allocation caches implementation.

sac.h

Segregated allocation caches interface.

sc.h

Stack context interface.

scan.c

Scanning functions.

seg.c

Segment implementation. See design.mps.seg.

shield.c

Shield implementation. See design.mps.shield.

splay.c

Splay tree implementation. See design.mps.splay.

splay.h

Splay tree interface. See design.mps.splay.

trace.c

Trace implementation. See design.mps.trace.

traceanc.c

More trace implementation. See design.mps.trace.

tract.c

Chunk and tract implementation. See design.mps.arena.

tract.h

Chunk and tract interface. See design.mps.arena.

tree.c

Binary tree implementation.

tree.h

Binary tree interface.

version.c

MPS version implementation. See design.mps.version.

walk.c

Formatted object walker.

Platform interfaces

These modules provide interfaces to features that are not available in standard C, and so may need to be ported to new platforms. See Porting the MPS.

File

Description

lock.h

Lock interface. See design.mps.lock.

lockan.c

Lock implementation for standard C.

lockix.c

Lock implementation for POSIX.

lockw3.c

Lock implementation for Windows.

prmcan.c

Mutator context implementation for standard C.

prmci3.h

Mutator context interface for IA-32.

prmci3fr.c

Mutator context implementation for FreeBSD, IA-32.

prmci3li.c

Mutator context implementation for Linux, IA-32.

prmci3w3.c

Mutator context implementation for Windows, IA-32.

prmci3xc.c

Mutator context implementation for OS X, IA-32.

prmci6.h

Mutator context interface for x86-64.

prmci6fr.c

Mutator context implementation for FreeBSD, x86-64.

prmci6li.c

Mutator context implementation for Linux, x86-64.

prmci6w3.c

Mutator context implementation for Windows, x86-64.

prmci6xc.c

Mutator context implementation for OS X, x86-64.

prmcix.h

Mutator context interface for POSIX.

prmcw3.h

Mutator context interface for Windows.

prmcxc.h

Mutator context interface for OS X.

prot.h

Protection interface. See design.mps.prot.

protan.c

Protection implementation for standard C.

proti3.c

Protection implementation for IA-32.

proti6.c

Protection implementation for x86-64.

protix.c

Protection implementation for POSIX.

protli.c

Protection implementation for Linux.

protsgix.c

Protection implementation for POSIX (signals part).

protw3.c

Protection implementation for Windows.

protxc.c

Protection implementation for OS X.

protxc.h

Protection interface for OS X.

pthrdext.c

Protection implementation for POSIX (threads part).

pthrdext.h

Protection interface for POSIX (threads part).

sp.h

Stack probe interface. See design.mps.sp.

span.c

Stack probe implementation for standard C.

spw3i3.c

Stack probe implementation for Windows, IA-32.

spw3i6.c

Stack probe implementation for Windows, x86-64.

ss.c

Stack scanning implementation (common part).

ss.h

Stack scanning interface. See design.mps.ss.

ssan.c

Stack scanning implementation for standard C.

ssixi3.c

Stack scanning implementation for POSIX, IA-32.

ssixi6.c

Stack scanning implementation for POSIX, x86-64.

ssw3i3mv.c

Stack scanning implementation for Windows, IA-32, Visual C.

ssw3i3pc.c

Stack scanning implementation for Windows, IA-32, Pelles C.

ssw3i6mv.c

Stack scanning implementation for Windows, x86-64, Visual C.

ssw3i6pc.c

Stack scanning implementation for Windows, x86-64, Pelles C.

th.h

Threads interface. See design.mps.thread-manager.

than.c

Threads implementation for standard C.

thix.c

Threads implementation for POSIX.

thw3.c

Threads implementation for Windows.

thw3.h

Threads interface for Windows.

thw3i3.c

Threads implementation for Windows, IA-32.

thw3i6.c

Threads implementation for Windows, x86-64.

thxc.c

Threads implementation for OS X.

vm.c

Virtual memory implementation (common part).

vm.h

Virtual memory interface. See design.mps.vm.

vman.c

Virtual memory implementation for standard C.

vmix.c

Virtual memory implementation for POSIX.

vmw3.c

Virtual memory implementation for Windows.

Pool classes

These files implement the supported pool classes. Some of these (MFS, MV) are used internally by the MPS; the others are available for client programs only. See Pool reference.

File

Description

poolamc.c

AMC (Automatic Mostly-Copying) implementation.

poolams.c

AMS (Automatic Mark and Sweep) implementation.

poolams.h

AMS (Automatic Mark and Sweep) internal interface.

poolawl.c

AWL (Automatic Weak Linked) implementation.

poollo.c

LO (Leaf Object) implementation.

poolmfs.c

MFS (Manual Fixed Small) implementation.

poolmfs.h

MFS (Manual Fixed Small) internal interface.

poolmv.c

MV (Manual Variable) implementation.

poolmv.h

MV (Manual Variable) internal interface.

poolmv2.c

AMC (Automatic Mostly-Copying) implementation.

poolmv2.h

MVT (Manual Variable Temporal) internal interface.

poolmvff.c

MVFF (Manual Variable First Fit) implementation.

poolsnc.c

SNC (Stack No Checking) implementation.

Auxiliary programs

These files implement auxiliary programs. See Telemetry utilities.

File

Description

eventcnv.c

Decoding the telemetry stream.

eventrep.c

Event replaying implementation (broken).

eventrep.h

Event replaying interface (broken).

eventsql.c

Loading the telemetry stream into SQLite.

eventtxt.c

Making the telemetry stream readable.

getopt.h

Command-line option interface. Adapted from FreeBSD.

getoptl.c

Command-line option implementation. Adapted from FreeBSD.

replay.c

Event replaying program (broken).

table.c

Address-based hash table implementation.

table.h

Address-based hash table interface.

Benchmarks

File

Description

djbench.c

Benchmark for manually managed pool classes.

gcbench.c

Benchmark for automatically managed pool classes.

Test support

This is code that’s shared between test cases.

File

Description

fmtdy.c

Dylan object format implementation.

fmtdy.h

Dylan object format interface.

fmtdytst.c

Dylan object constructor implementation.

fmtdytst.h

Dylan object constructor interface.

fmthe.c

Dylan-like object format with headers (implementation).

fmthe.h

Dylan-like object format with headers (interface).

fmtno.c

Null object format implementation.

fmtno.h

Null object format interface.

fmtscheme.c

Scheme object format implementation.

fmtscheme.h

Scheme object format interface.

pooln.c

Null pool implementation.

pooln.h

Null pool interface.

testlib.c

Test utilities implementation.

testlib.h

Test utilities interface.

testthr.h

Test threads interface. See design.mps.testthr.

testthrix.c

Test threads implementation for POSIX.

testthrw3.c

Test threads implementation for Windows.

Interactive test cases

These test cases provide harness for interacting with parts of the MPS, for exploring the interface and testing by hand. These predate the use of continuous integration: we wouldn’t write this kind of test case now.

File

Description

bttest.c

Interactive bit tables test harness.

teletest.c

Interactive telemetry test harness.

Automated test cases

These are test cases that run automatically and form the main test suite. See design.mps.tests.

File

Description

abqtest.c

Fixed-length queue test.

airtest.c

Ambiguous interior reference test.

amcss.c

AMC (Automatic Mostly-Copying) stress test.

amcsshe.c

AMC (Automatic Mostly-Copying) stress test (using in-band headers).

amcssth.c

AMC (Automatic Mostly-Copying) stress test (using multiple threads).

amsss.c

AMS (Automatic Mark and Sweep) stress test.

amssshe.c

AMS (Automatic Mark and Sweep) stress test (using in-band headers).

apss.c

Allocation points stress test.

arenacv.c

Arena coverage test.

awlut.c

AWL (Automatic Weak Linked) unit test.

awluthe.c

AWL (Automatic Weak Linked) unit test (using in-band headers).

awlutth.c

AWL (Automatic Weak Linked) unit test (using multiple threads).

btcv.c

Bit table coverage test.

exposet0.c

mps_arena_expose() test.

expt825.c

Regression test for job000825.

fbmtest.c

Free block manager (CBS and Freelist) test.

finalcv.c

Finalization coverage test.

finaltest.c

Finalization test.

fotest.c

Failover allocator test.

landtest.c

Land test.

locbwcss.c

Locus backwards compatibility stress test.

lockcov.c

Lock coverage test.

lockut.c

Lock unit test.

locusss.c

Locus stress test.

locv.c

LO (Leaf Object) coverage test.

messtest.c

Messages test.

mpmss.c

Manual allocation stress test.

mpsicv.c

External interface coverage test.

mv2test.c

MVT (Manual Variable Temporal) test.

nailboardtest.c

Nailboard test.

poolncv.c

Null pool class test.

qs.c

Quicksort test.

sacss.c

Segregated allocation caches stress test.

segsmss.c

Segment splitting and merging stress test.

steptest.c

mps_arena_step() test.

tagtest.c

Tagged pointer scanning test.

walkt0.c

Formatted object walking test.

zcoll.c

Garbage collection progress test.

zmess.c

Garbage collection and finalization message test.

Build infrastructure

These are makefiles (and makefile fragments) used to build the MPS. See Porting the MPS.

File

Description

anangc.gmk

GNU makefile for platform ANANGC.

ananll.gmk

GNU makefile for platform ANANLL.

ananmv.nmk

NMAKE file for platform ANANMV.

comm.gmk

Common GNU make fragment.

commpost.nmk

Common NMAKE fragment (included before the compiler fragment).

commpre.nmk

Common NMAKE fragment (included after the compiler fragment).

fri3gc.gmk

GNU makefile for platform FRI3GC.

fri3ll.gmk

GNU makefile for platform FRI3LL.

fri6gc.gmk

GNU makefile for platform FRI6GC.

fri6ll.gmk

GNU makefile for platform FRI6LL.

gc.gmk

GNU make fragment for GCC.

gp.gmk

GNU make fragment for GCC/GProf (broken).

lii3gc.gmk

GNU makefile for platform LII3GC.

lii6gc.gmk

GNU makefile for platform LII6GC.

lii6ll.gmk

GNU makefile for platform LII6LL.

ll.gmk

GNU make fragment for Clang/LLVM.

mv.nmk

NMAKE fragment for Microsoft Visual C.

pc.nmk

NMAKE fragment for Pelles C.

w3i3mv.nmk

NMAKE file for platform W3I3MV.

w3i3pc.nmk

NMAKE file for platform W3I3PC.

w3i6mv.nmk

NMAKE file for platform W3I6MV.

w3i6pc.nmk

NMAKE file for platform W3I6PC.

xci3gc.gmk

GNU makefile for platform XCI3GC.

xci6ll.gmk

GNU makefile for platform XCI6LL.