From 9a5313b344f520d814b52c2ff917d2c9ea6d4060 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 22 Feb 2018 00:07:47 +0100 Subject: [PATCH] Added MEMGetAllocatableSizeForExpHeapEx --- source/os_functions.c | 6 +++++- source/os_functions.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/os_functions.c b/source/os_functions.c index 05d27a9..a7af5a9 100644 --- a/source/os_functions.c +++ b/source/os_functions.c @@ -127,7 +127,8 @@ EXPORT_VAR(u32 *, pMEMFreeToDefaultHeap); EXPORT_DECL(void *, MEMAllocFromAllocator, void * allocator, u32 size); EXPORT_DECL(void, MEMFreeToAllocator, void * allocator, void* address); -EXPORT_DECL(s32, MEMGetBaseHeapHandle, s32 mem_arena); +EXPORT_DECL(s32, MEMGetBaseHeapHandle, s32 mem_arena); +EXPORT_DECL(u32, MEMGetAllocatableSizeForExpHeapEx, s32 heap, s32 align); EXPORT_DECL(u32, MEMGetAllocatableSizeForFrmHeapEx, s32 heap, s32 align); EXPORT_DECL(void *, MEMAllocFromFrmHeapEx, s32 heap, u32 size, s32 align); EXPORT_DECL(void, MEMFreeToFrmHeap, s32 heap, s32 mode); @@ -139,6 +140,8 @@ EXPORT_DECL(void *, OSAllocFromSystem, u32 size, s32 alignment); EXPORT_DECL(void, OSFreeToSystem, void *addr); EXPORT_DECL(s32, OSIsAddressValid, const void *ptr); + + //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //! MCP functions //!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -343,6 +346,7 @@ void InitOSFunctionPointers(void){ OS_FIND_EXPORT(coreinit_handle, MEMAllocFromAllocator); OS_FIND_EXPORT(coreinit_handle, MEMFreeToAllocator); OS_FIND_EXPORT(coreinit_handle, MEMGetBaseHeapHandle); + OS_FIND_EXPORT(coreinit_handle, MEMGetAllocatableSizeForExpHeapEx); OS_FIND_EXPORT(coreinit_handle, MEMGetAllocatableSizeForFrmHeapEx); OS_FIND_EXPORT(coreinit_handle, MEMAllocFromFrmHeapEx); OS_FIND_EXPORT(coreinit_handle, MEMFreeToFrmHeap); diff --git a/source/os_functions.h b/source/os_functions.h index ec4f6af..d07093d 100644 --- a/source/os_functions.h +++ b/source/os_functions.h @@ -211,6 +211,7 @@ extern u32 *pMEMFreeToDefaultHeap; extern void* (* MEMAllocFromAllocator) (void * allocator, u32 size); extern void (* MEMFreeToAllocator) (void * allocator, void* address); extern s32 (* MEMGetBaseHeapHandle)(s32 mem_arena); +extern u32 (* MEMGetAllocatableSizeForExpHeapEx)(s32 heap, s32 align); extern u32 (* MEMGetAllocatableSizeForFrmHeapEx)(s32 heap, s32 align); extern void* (* MEMAllocFromFrmHeapEx)(s32 heap, u32 size, s32 align); extern void (* MEMFreeToFrmHeap)(s32 heap, s32 mode);