Allocates memory from a Nintendo 64 audio heap
#include <libaudio.h> /* libaudio.h */ void *alHeapAlloc(ALHeap *hp, s32 num, s32 size);
alHeapAlloc allocates cache-aligned memory from an audio DRAM heap.
In the debug version of the libultra library (libultra_d), this function also inserts some debugging information that allows the alHeapCheck function to test for heap consistency.
Most memory management schemes allocate additional memory for region headers to facilitate the management of the memory region. The non-debug version of this function 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 that cache alignment is important for structures that contain elements shared with the reality co-processor (RCP).
1999/04/30 Changed Format