'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH ddi_dki.map @(#)map	40.7 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} map D4DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} map D4DK "" "DDI/DKI"
.if \nX=2 .ds x} map D4DK "" "\&"
.if \nX=3 .ds x} map "" "" "\&"
.TH \*(x}
.IX "\f4map\fP(D4D)"
.SH NAME
\f4map\f1 \- private memory map structure
.SH SYNOPSIS
\f4#include <sys/map.h>\f1
.SH DESCRIPTION
The \f4map\f1 structure defines the size and index into a private
space management map.  The private map is declared as an instance of
the \f4map\fP structure using the driver prefix in the form
\f2prefix\f4map\f1.  The size is defined in the \f4m_size\fP field
as the number of arbitrary units used to make up the map.  The index
is defined in \f4m_addr\fP as the first available unit of the map.  
.P
Private maps are managed through a set five functions:
.P
.RS 4n
.PD 0
.TP 14
\f4rmalloc\fP
allocates space from a defined and initialized map
.TP
\f4rmfree\fP
returns previously allocated space to map
.TP
\f4rminit\fP
defines a map structure and initializes a map table
.TP
\f4rmwant\fP
returns the number of processes waiting for free space
.TP
\f4rmsetwant\fP
increments the count of the number of processes waiting for free
space in the map
.PD
.RE
.P
Private maps can be made up of any units appropriate for the
specific uses of the map.  For example, units may be byte addresses,
pages of memory, or blocks.  The map itself does not define the
resource, and the size of the map is not related to the size of the
\f4map\f1 structure.
.SH STRUCTURE MEMBERS
.TS
lf4p8 2 lf4p8 2 lf4p8.
unsigned long	m_size	/* number of units available */
unsigned long	m_addr	/* address of first available unit */
.TE
.SH SEE ALSO
.na
\f4rmalloc\f1(D3DK),
\f4rmfree\f1(D3DK),
\f4rminit\f1(D3DK),
\f4rmsetwant\f1(D3DK),
\f4rmwant\f1(D3DK)
.ad
