alHeapAlloc.3p 1.12 KB
.TH alHeapAlloc 3P local "Silicon Graphics, Inc."

.SH NAME
.upperok
alHeapAlloc \- allocate memory from an Ultra 64 audio heap.

.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
void    *alHeapAlloc(ALHeap *hp, s32 num, s32 size);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.I hp
pointer to the ALHeap structure.
.TP
.I num
number of records to allocate.
.TP
.I size
size, in bytes, of the records to allocate.
.SH DESCRIPTION
.I alHeapAlloc
allocates cache-aligned memory from an audio DRAM heap. In the debug
version of libultra (libultra_d),
.I alHeapAlloc
also inserts some debugging information that allows 
.I alHeapCheck
to test for heap consistency.

Note: Most memory management schemes allocate additional memory for
region headers to facilitate the management of the memory region. The
non-debug version of 
.I alHeapAlloc
does not allocate any memory other than that requested or required for
cache alignment. As a result, memory allocated from audio heaps cannot
be freed.

Note: Cache alignment is important for structures that contain
elements shared with the RCP.

.SH SEE ALSO
.IR alHeapInit (3P),
.IR alHeapCheck (3P)