Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmfree(9F) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rmalloc(9F)

rmalloc_wait(9F)

rmallocmap(9F)

rmfreemap(9F)

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);

ARGUMENTS

mp Pointer to the map structure. 

size Number of units being freed. 

index Index of the first unit of the allocated resource. 

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI). 

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. 

Drivers may define resource maps for resource allocation, in terms of arbitrary units, using the rmallocmap(9F), function.  The system maintains 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. 

CONTEXT

rmfree() can be called from user or interrupt context. 

SEE ALSO

rmalloc(9F), rmalloc_wait(9F), rmallocmap(9F), rmfreemap(9F)

SunOS 5.3 Writing Device Drivers

Sun Microsystems  —  Last change: 19 Nov 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026