1
\documentstyle[11pt,twocolumn]{article}
4
\setlength{\topmargin}{0in}
5
\setlength{\headheight}{0in}
6
\setlength{\headsep}{0in}
7
\setlength{\topskip}{0in}
8
\setlength{\textheight}{8.5in}
9
\setlength{\footheight}{10pt}
10
\setlength{\footskip}{0.5in}
12
% horizontal parameters
13
\setlength{\textwidth}{6.5in}
14
\setlength{\oddsidemargin}{0in}
15
\setlength{\evensidemargin}{0in}
16
\setlength{\marginparwidth}{0in}
17
\setlength{\parindent}{0in}
21
MA is a library of routines that comprises a dynamic memory allocator
22
for use by C, FORTRAN, or mixed-language applications. C applications
23
can benefit from using MA instead of the ordinary malloc() and free()
24
routines because of the extra features MA provides: both heap and
25
stack memory management disciplines, debugging and verification
26
support, usage statistics, and quantitative memory availability
27
information. FORTRAN applications can take advantage of the same
28
features, and may in fact require a library such as MA because dynamic
29
memory allocation is not supported by all versions of the language.
31
MA is designed to be portable across a variety of platforms.
32
The following platforms are currently supported:
45
\item SGI Power Challenge
49
The implementation of MA uses the following memory layout:
52
segment = heap\_region stack\_region \\
53
region = block block block \ldots \\
54
block = AD gap1 guard1 client\_space guard2 gap2
57
A segment of memory is obtained from the OS upon initialization.
58
The low end of the segment is managed as a heap; the heap region
59
grows from low addresses to high addresses. The high end of the
60
segment is managed as a stack; the stack region grows from high
61
addresses to low addresses.
63
Each region consists of a series of contiguous blocks, one per
64
allocation request, and possibly some unused space. Blocks in
65
the heap region are either in use by the client (allocated and
66
not yet deallocated) or not in use by the client (allocated and
67
already deallocated). A block on the rightmost end of the heap
68
region becomes part of the unused space upon deallocation.
69
Blocks in the stack region are always in use by the client,
70
because when a stack block is deallocated, it becomes part of
73
A block consists of the client space, i.e., the range of memory
74
available for use by the application; guard words adjacent to
75
each end of the client space to help detect improper memory access
76
by the client; bookkeeping info (in an ``allocation descriptor,''
77
AD); and two gaps, each zero or more bytes long, to satisfy
78
alignment constraints (specifically, to ensure that AD and
79
client\_space are aligned properly).
81
A set of man pages for the MA routines is available.