rmallocmap(D3DK) —
NAME
rmallocmap − allocate and initialize a private space management map .IX \f4rmallocmap\fP(D3DK)
SYNOPSIS
#include <sys/types.h>
#include <sys/map.h>
struct map ∗rmallocmap(ulong_t mapsize);
ARGUMENTS
mapsizeNumber of entries for the map.
DESCRIPTION
rmallocmap allocates and initializes a private map array that can be used for the allocation of space.
Although rmallocmap 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 rmfree(D3DK) prior to attempting to allocate space from the map using rmalloc(D3DK) or rmalloc_wait(D3DK).
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. The elements of the map are sorted by index.
RETURN VALUE
Upon successful completion, rmallocmap returns a pointer to the newly allocated map. Upon failure, a NULL pointer is returned.
LEVEL
Base or Interrupt.
NOTES
Does not sleep. Driver defined basic locks, read/write locks, and sleep locks may be held across calls to this function. DDI/DKI conforming drivers may only use map structures which have been allocated and initialized using rmallocmap. Use of map structures which have been obtained by any other means is prohibited.
SEE ALSO
rmalloc(D3DK), rmalloc_wait(D3DK), rmfree(D3DK), rmfreemap(D3DK)
DDI/DKI