SPTFREE(K) UNIX System V SPTFREE(K)
Name
sptfree - releases memory previously allocated with sptalloc
Syntax
void
sptfree(va, npages, freeflg)
char *va;
int npages;
int freeflg;
Description
The sptfree routine frees memory obtained from sptalloc(K).
The arguments are the pointer returned by sptalloc, the size
of the memory (same as passed to sptalloc) and a flag which
denotes whether you want this freed memory to go back into
the free page list. For drivers which use this to free
memory obtained from sptalloc, the flag must always be 1.
For example, to release the memory obtained by a call to the
sptalloc routine, and free it completely, use the following
statement:
sptfree( va, npages, 1 );
Parameters
The argument va is the virtual address returned from a
previous call to sptalloc.
The value of npages is the number of pages to free. This
should be the same number of pages allocated by a previous
call to sptalloc.
The argument freeflg indicates whether to actually free the
memory pages or not. If freeflg is not set, the memory
pages are not freed. This is used, for example, when
freeing memory-mapped I/O space.
See Also
sptalloc(K)
(printed 7/6/89)