HeapAvail Function (ROM Call 0x8F)

alloc.h

unsigned long HeapAvail (void);

Determines the size of the heap.

HeapAvail returns the total amount of free bytes in the heap (the sum of all of the individual blocks of memory).