SSBM Decomp
|
Macros | |
#define | InRange(addr, start, end) ((u8*) (start) <= (u8*) (addr) && (u8*) (addr) < (u8*) (end)) |
#define | OFFSET(addr, align) (((uintptr_t) (addr) & ((align) - 1))) |
#define | ALIGNMENT 32 |
#define | MINOBJSIZE 64 |
#define | CHECK(line, condition) |
Functions | |
static void * | DLAddFront (HeapCell *neighbor, HeapCell *cell) |
Inserts cell before neighbor and returns cell . | |
static HeapCell * | DLExtract (HeapCell *list, HeapCell *cell) |
Removes cell from list and returns list . */. | |
static HeapCell * | DLInsert (HeapCell *list, HeapCell *cell, UNK_T _) |
void * | OSAllocFromHeap (OSHeapHandle heap, size_t size) |
void | OSFreeToHeap (OSHeapHandle heap, void *ptr) |
OSHeapHandle | OSSetCurrentHeap (OSHeapHandle heap) |
void * | OSInitAlloc (void *arenaStart, void *arenaEnd, int maxHeaps) |
OSHeapHandle | OSCreateHeap (void *start, void *end) |
void | OSDestroyHeap (size_t idx) |
size_t | OSCheckHeap (OSHeapHandle heap) |
Variables | |
static Heap * | HeapArray |
static ssize_t | NumHeaps |
static void * | ArenaStart |
static void * | ArenaEnd |
volatile OSHeapHandle | __OSCurrHeap = -1 |
static char | _unused_str0 [] = "\nOSDumpHeap(%d):\n" |
static char | _unused_str1 [] = "--------Inactive\n" |
static char | _unused_str2 [] = "addr\tsize\t\tend\tprev\tnext\n" |
static char | _unused_str3 [] = "--------Allocated\n" |
static char | _unused_str4 [] = "%x\t%d\t%x\t%x\t%x\n" |
static char | _unused_str5 [] = "--------Free\n" |
#define OFFSET | ( | addr, | |
align | |||
) | (((uintptr_t) (addr) & ((align) - 1))) |
#define ALIGNMENT 32 |
#define MINOBJSIZE 64 |
#define CHECK | ( | line, | |
condition | |||
) |
Inserts cell
before neighbor
and returns cell
.
Removes cell
from list
and returns list
. */.
list | |
cell | |
_ | Needed to match OSFreeToHeap. |
void * OSAllocFromHeap | ( | OSHeapHandle | heap, |
size_t | size | ||
) |
void OSFreeToHeap | ( | OSHeapHandle | heap, |
void * | ptr | ||
) |
OSHeapHandle OSSetCurrentHeap | ( | OSHeapHandle | heap | ) |
void * OSInitAlloc | ( | void * | arenaStart, |
void * | arenaEnd, | ||
int | maxHeaps | ||
) |
OSHeapHandle OSCreateHeap | ( | void * | start, |
void * | end | ||
) |
void OSDestroyHeap | ( | size_t | idx | ) |
size_t OSCheckHeap | ( | OSHeapHandle | heap | ) |
|
static |
|
static |
|
static |
|
static |
volatile OSHeapHandle __OSCurrHeap = -1 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |