.if n .pH ddi.rm/d3/gen/rmallocmap @(#)rmallocmap 43.7 of 11/27/92 .\" Copyright 1991, 1992 UNIX System Laboratories, Inc. .\" Copyright 1989 AT&T .TH rmallocmap D3 .SH NAME \f4rmallocmap\f1 \- allocate and initialize a private space management map .IX "\f4rmallocmap\fP(D3)" .SH SYNOPSIS .nf .na .ft 4 #include #include #include .sp 0.4 struct map *rmallocmap(ulong_t \f2mapsize\fP); .ft 1 .ad .fi .SS Arguments .RS 0 .IP "\f2mapsize\f1" 10n Number of entries for the map. .RE .SH DESCRIPTION \f4rmallocmap\f1 allocates and initializes a private map array that can be used for the allocation of space. .SS "Return Values" On success, \f4rmallocmap\f1 returns a pointer to the newly allocated map. On failure, a \f4NULL\f1 pointer is returned. .SH USAGE Although \f4rmallocmap\f1 allocates and initializes the map array itself, it does not allocate the space that the map will manage. This space must be allocated separately and must be added to the map using \f4rmfree\fP(D3) prior to attempting to allocate space from the map using \f4rmalloc\fP(D3) or \f4rmalloc_wait\fP(D3). .P The system maintains the map list structure by size and index. The caller places whatever semantics on the units of size are appropriate for the type of space being managed. For example, units may be byte addresses, pages of memory, or blocks. .P On systems where the \f4rmallocmap\fP function is available, DDI/DKI conforming drivers may only use \f4map\f1 structures which have been allocated and initialized using \f4rmallocmap\f1. Use of \f4map\f1 structures which have been obtained by any other means is prohibited on such systems. .SS Level Initialization, Base or Interrupt. .SS "Synchronization Constraints" Does not sleep. .P Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function. .SH REFERENCES .na \f4rmalloc\fP(D3), \f4rmalloc_wait\fP(D3), \f4rmfree\fP(D3), \f4rmfreemap\fP(D3) .ad