sunos man page for rmfree

Query: rmfree

OS: sunos

Section: 9f

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

rmfree(9F)						   Kernel Functions for Drivers 						rmfree(9F)

NAME
rmfree - free space back into a resource map
SYNOPSIS
#include <sys/map.h> #include <sys/ddi.h> void rmfree(struct map *mp, size_t size, ulong_t index);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
mp Pointer to the map structure. size Number of units being freed. index Index of the first unit of the allocated resource.
DESCRIPTION
rmfree() releases space back into a resource map. It is the opposite of rmalloc(9F), which allocates space that is controlled by a resource map structure. When releasing resources using rmfree() the size and index passed to rmfree() must exactly match the size and index values passed to and returned from a previous call to rmalloc(). Resources cannot be returned piecemeal. Drivers may define resource maps for resource allocation, in terms of arbitrary units, using the rmallocmap(9F) function. The system main- tains the resource map structure by size and index, computed in units appropriate for the resource. For example, units may be byte addresses, pages of memory, or blocks. rmfree() frees up unallocated space for re-use. rmfree() can also be used to initialize a resource map, in which case the size and index should cover the entire resource area.
CONTEXT
rmfree() can be called from user or interrupt context.
SEE ALSO
rmalloc(9F), rmalloc_wait(9F), rmallocmap(9F), rmfreemap(9F) Writing Device Drivers SunOS 5.10 4 Jun 2001 rmfree(9F)
Related Man Pages
bp_mapin(9f) - opensolaris
rmallocmap(9f) - sunos
rmfreemap(9f) - sunos
rmalloc(9f) - opensolaris
rmfreemap(9f) - opensolaris
Similar Topics in the Unix Linux Community
spacemaps 0.1 (Default branch)
BaconMap 0.6 (Default branch)
Mmap with fork : Resource unavaialable temporarily
unallocated space