Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
OSAlloc.h
Go to the documentation of this file.
1#ifndef _DOLPHIN_OSALLOC_H_
2#define _DOLPHIN_OSALLOC_H_
3
4#include <dolphin/types.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef int OSHeapHandle;
11
12extern volatile OSHeapHandle __OSCurrHeap;
13
14void* OSAllocFromHeap(int heap, u32 size);
15void* OSAllocFixed(void* rstart, void* rend);
16void OSFreeToHeap(int heap, void* ptr);
17int OSSetCurrentHeap(int heap);
18void* OSInitAlloc(void* arenaStart, void* arenaEnd, int maxHeaps);
19int OSCreateHeap(void* start, void* end);
20void OSDestroyHeap(int heap);
21void OSAddToHeap(int heap, void* start, void* end);
22s32 OSCheckHeap(int heap);
23u32 OSReferentSize(void* ptr);
24void OSDumpHeap(int heap);
25void OSVisitAllocated(void (*visitor)(void*, u32));
26
27#define OSAlloc(size) OSAllocFromHeap(__OSCurrHeap, (size))
28#define OSFree(ptr) OSFreeToHeap(__OSCurrHeap, (ptr))
29
30#ifdef __cplusplus
31}
32#endif
33
34#endif
volatile OSHeapHandle __OSCurrHeap
Definition OSAlloc.c:39
void OSVisitAllocated(void(*visitor)(void *, u32))
Definition OSAlloc.c:598
void OSAddToHeap(int heap, void *start, void *end)
Definition OSAlloc.c:462
void * OSAllocFixed(void *rstart, void *rend)
Definition OSAlloc.c:216
u32 OSReferentSize(void *ptr)
Definition OSAlloc.c:551
void OSDestroyHeap(int heap)
Definition OSAlloc.c:435
void * OSInitAlloc(void *arenaStart, void *arenaEnd, int maxHeaps)
Definition OSAlloc.c:357
void OSDumpHeap(int heap)
Definition OSAlloc.c:566
int OSHeapHandle
Definition OSAlloc.h:10
s32 OSCheckHeap(int heap)
Definition OSAlloc.c:502
void * OSAllocFromHeap(int heap, u32 size)
Definition OSAlloc.c:150
void OSFreeToHeap(int heap, void *ptr)
Definition OSAlloc.c:324
int OSSetCurrentHeap(int heap)
Definition OSAlloc.c:346
int OSCreateHeap(void *start, void *end)
Definition OSAlloc.c:386
unsigned int size
Definition __os.h:106
static void end(b_oh_class *i_this)
Definition d_a_b_oh.cpp:527
@ start
Definition strtoul.c:8
unsigned long u32
Definition types.h:9
signed long s32
Definition types.h:8