3 types of heaps exist: EXPH (exponential heap), FRMH (frame heap), and UNTH (unit heap).
3 types of heaps exist: EXPH (exponential heap), FRMH (frame heap), and UNTH (unit heap).
+
+
== Time ==
+
Time is kept with timers 2 and 3, while alarm interrupts are handled by timer 1; timer 0 is presumably reserved for the DMA sound channels. The OS orders the alarms by alert time, so that it only needs to keep track of the frontmost alarm.
+
+
<pre>
+
struct OSAlarm {
+
void (*handler)(void *userData);
+
void *userData;
+
u32 unknown;
+
u64 alertTime;
+
struct OSAlarm *prev;
+
struct OSAlarm *next;
+
u64 repeatInterval; // 0 for non-repeating alarms
+
u64 repeatStart; // undefined value for non-repeating alarms