alHeapAlloc.3p
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.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)