diff --git a/os_functions.c b/os_functions.c index a0a4928..08514a1 100644 --- a/os_functions.c +++ b/os_functions.c @@ -99,6 +99,8 @@ EXPORT_DECL(void *, MEMAllocFromExpHeapEx, s32 heap, u32 size, s32 align); EXPORT_DECL(s32 , MEMCreateExpHeapEx, void* address, u32 size, unsigned short flags); EXPORT_DECL(void *, MEMDestroyExpHeap, s32 heap); EXPORT_DECL(void, MEMFreeToExpHeap, s32 heap, void* ptr); +EXPORT_DECL(void *, OSAllocFromSystem, int size, int alignment); +EXPORT_DECL(void, OSFreeToSystem, void *addr); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! MCP functions @@ -268,6 +270,8 @@ void InitOSFunctionPointers(void) OS_FIND_EXPORT(coreinit_handle, MEMCreateExpHeapEx); OS_FIND_EXPORT(coreinit_handle, MEMDestroyExpHeap); OS_FIND_EXPORT(coreinit_handle, MEMFreeToExpHeap); + OS_FIND_EXPORT(coreinit_handle, OSAllocFromSystem); + OS_FIND_EXPORT(coreinit_handle, OSFreeToSystem); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! Other function addresses diff --git a/os_functions.h b/os_functions.h index 6aad386..474db4d 100644 --- a/os_functions.h +++ b/os_functions.h @@ -138,6 +138,8 @@ extern void *(* MEMAllocFromExpHeapEx)(s32 heap, u32 size, s32 align); extern s32 (* MEMCreateExpHeapEx)(void* address, u32 size, unsigned short flags); extern void *(* MEMDestroyExpHeap)(s32 heap); extern void (* MEMFreeToExpHeap)(s32 heap, void* ptr); +extern void* (* OSAllocFromSystem)(int size, int alignment); +extern void (* OSFreeToSystem)(void *addr); //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! MCP functions