coastline 0.0.4
Loading...
Searching...
No Matches
heap.h File Reference

The interface heap that screens load their data into, and the clearing of the frame buffers between screens. More...

#include <PR/ultratypes.h>
Include dependency graph for heap.h:

Go to the source code of this file.

Functions

void ResetHeap (void)
 Empty the heap.
u8 * GetHeapCurrentAddress (void)
 Return the next free byte of the heap, to free what follows it later.
void SetHeapCurrentAddress (u8 *address)
 Free everything after an address GetHeapCurrentAddress() returned.
void * AllocHeapAligned (u32 size)
 Allocate memory aligned to 8 bytes.
void ClearFramebuffersForWideMode (void)
 Blank the display and clear the frame buffers in the wide display mode.
void ClearFramebuffersForNormalMode (void)
 Blank the display and clear the frame buffers in the normal display mode.

Variables

u8 * g_pHeapCurrent
 The next free byte of the interface heap.

Detailed Description

The interface heap that screens load their data into, and the clearing of the frame buffers between screens.

Function Documentation

◆ ResetHeap()

void ResetHeap ( void )

Empty the heap.

Ghidra address:
USA: 0x80242940
Ghidra address:
Asia: 0x80242490
Ghidra address:
EUR: 0x80243e50
Ghidra address:
JPN: 0x80243950
Ghidra address:
BRD3D: 0x10036020
Ghidra address:
BRGlide: 0x1002f6c0

◆ GetHeapCurrentAddress()

u8 * GetHeapCurrentAddress ( void )

Return the next free byte of the heap, to free what follows it later.

Returns
The next free byte.
Ghidra address:
USA: 0x80242954
Ghidra address:
Asia: 0x802424A4
Ghidra address:
EUR: 0x80243e64
Ghidra address:
JPN: 0x80243964

◆ SetHeapCurrentAddress()

void SetHeapCurrentAddress ( u8 * address)

Free everything after an address GetHeapCurrentAddress() returned.

Parameters
addressThe new next free byte.
Ghidra address:
USA: 0x80242960
Ghidra address:
Asia: 0x802424B0
Ghidra address:
EUR: 0x80243e70
Ghidra address:
JPN: 0x80243970

◆ AllocHeapAligned()

void * AllocHeapAligned ( u32 size)

Allocate memory aligned to 8 bytes.

Running out is reported on the debug display, and the allocation succeeds regardless.

Parameters
sizeThe size in bytes.
Returns
The start of the allocation.
Ghidra address:
USA: 0x8024296c
Ghidra address:
Asia: 0x802424BC
Ghidra address:
EUR: 0x80243e7c
Ghidra address:
JPN: 0x8024397c

◆ ClearFramebuffersForWideMode()

void ClearFramebuffersForWideMode ( void )

Blank the display and clear the frame buffers in the wide display mode.

Ghidra address:
USA: 0x802429ec
Ghidra address:
Asia: 0x8024253C
Ghidra address:
EUR: 0x80243efc
Ghidra address:
JPN: 0x802439fc

◆ ClearFramebuffersForNormalMode()

void ClearFramebuffersForNormalMode ( void )

Blank the display and clear the frame buffers in the normal display mode.

Ghidra address:
USA: 0x80242a7c
Ghidra address:
Asia: 0x802425CC
Ghidra address:
EUR: 0x80243f88
Ghidra address:
JPN: 0x80243a88

Variable Documentation

◆ g_pHeapCurrent

u8* g_pHeapCurrent
extern

The next free byte of the interface heap.

Ghidra address:
USA: 0x80369b70
Ghidra address:
Asia: 0x80369620
Ghidra address:
EUR: 0x8036c070
Ghidra address:
JPN: 0x8036ace0
Ghidra address:
BRD3D: 0x106c7c38
Ghidra address:
BRGlide: 0x106eecc8