Import SDK Types
This commit is contained in:
parent
84b3e69630
commit
4fe4c38e0d
86 changed files with 6528 additions and 27 deletions
30
include/dolphin/os/OSAlloc.h
Normal file
30
include/dolphin/os/OSAlloc.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef _DOLPHIN_OSALLOC
|
||||
#define _DOLPHIN_OSALLOC
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int OSHeapHandle;
|
||||
typedef void (*OSAllocVisitor)(void* obj, u32 size);
|
||||
void* OSInitAlloc(void* arenaStart, void* arenaEnd, int maxHeaps);
|
||||
OSHeapHandle OSCreateHeap(void* start, void* end);
|
||||
void OSDestroyHeap(OSHeapHandle heap);
|
||||
void OSAddToHeap(OSHeapHandle heap, void* start, void* end);
|
||||
OSHeapHandle OSSetCurrentHeap(OSHeapHandle heap);
|
||||
void* OSAllocFromHeap(OSHeapHandle heap, u32 size);
|
||||
void* OSAllocFixed(void** rstart, void** rend);
|
||||
void OSFreeToHeap(OSHeapHandle heap, void* ptr);
|
||||
long OSCheckHeap(OSHeapHandle heap);
|
||||
void OSDumpHeap(OSHeapHandle heap);
|
||||
u32 OSReferentSize(void* ptr);
|
||||
void OSVisitAllocated(OSAllocVisitor visitor);
|
||||
extern volatile OSHeapHandle __OSCurrHeap;
|
||||
#define OSAlloc(size) OSAllocFromHeap(__OSCurrHeap, (size))
|
||||
#define OSFree(ptr) OSFreeToHeap(__OSCurrHeap, (ptr))
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DOLPHIN_OSALLOC
|
||||
Loading…
Add table
Add a link
Reference in a new issue