Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rmalloc(9r) [osf1 man page]

rmalloc(9r)															       rmalloc(9r)

NAME
rmalloc - General: Allocates size units from the given resource map SYNOPSIS
long rmalloc( struct map *map_struct, long size ); 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. DESCRIPTION
The rmalloc routine allocates size units from the given resource map. In a map, the addresses are increasing, and the list is terminated by a zero size. The actual units managed by the map are arbitrary and can be map registers, bytes, blocks, and so forth. NOTES
The caller is responsible for providing any locking necessary for the map structure that the system passes to the rmalloc routine. RETURN VALUES
The rmalloc routine returns the base of the allocated space. It returns an error if no space could be allocated. SEE ALSO
Routines: rmfree(9r), rmget(9r), rminit(9r) rmalloc(9r)

Check Out this Related Man Page

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)
Man Page

We Also Found This Discussion For You

1. What is on Your Mind?

Throw my Toys out of the Pram!

Hi Folks, Today hasn't been the best one of my career in IT. I've been a contractor for a major utility company for a number of years, on a number of seperate IT contracts mostly Unix. The company had 10 different flavours of unix and multiple different varsions of most of them. At the... (3 Replies)
Discussion started by: gull04
3 Replies