Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rmget(9r) [osf1 man page]

rmget(9r)																 rmget(9r)

rmget - General: Allocates size units from the given resource map SYNOPSIS
int rmget( struct map *map_struct, long size, long addr ); ARGUMENTS
Specifies a pointer to a map structure that was previously initialized by a call to rminit. Specifies the size of the units to allocate. Specifies the address at which to allocate the space. DESCRIPTION
The rmget routine allocates the number of units specified in size, starting at the address specified in addr. NOTES
The caller is responsible for providing any locking necessary for the map structure that the system passes to the rmget routine. RETURN VALUES
Upon successful completion, rmget returns the starting address, addr. Otherwise, it returns the value 0 (zero). SEE ALSO
Routines: rmalloc(9r), rmfree(9r), rminit(9r) rmget(9r)

Check Out this Related Man Page

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

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
The rmfree() function 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. The rmfree() function can also be used to initialize a resource map, in which case the size and index should cover the entire resource area. CONTEXT
The rmfree() function can be called from user, interrupt, or kernel context. SEE ALSO
rmalloc(9F), rmalloc_wait(9F), rmallocmap(9F), rmfreemap(9F) Writing Device Drivers SunOS 5.11 16 Jan 2006 rmfree(9F)
Man Page