mirror of
https://github.com/Maschell/dynamic_libs.git
synced 2024-08-20 20:09:10 +02:00
os_functions: Add OS{AllocFrom,FreeTo}System
OSAllocFromSystem allocates a physically contiguous area of memory, and returns a pointer to it as a virtual address in the calling process's address space. OSFreeToSystem is the corresponding free function.
This commit is contained in:
parent
775993a09b
commit
1afc4b899e
@ -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(s32 , MEMCreateExpHeapEx, void* address, u32 size, unsigned short flags);
|
||||||
EXPORT_DECL(void *, MEMDestroyExpHeap, s32 heap);
|
EXPORT_DECL(void *, MEMDestroyExpHeap, s32 heap);
|
||||||
EXPORT_DECL(void, MEMFreeToExpHeap, s32 heap, void* ptr);
|
EXPORT_DECL(void, MEMFreeToExpHeap, s32 heap, void* ptr);
|
||||||
|
EXPORT_DECL(void *, OSAllocFromSystem, int size, int alignment);
|
||||||
|
EXPORT_DECL(void, OSFreeToSystem, void *addr);
|
||||||
|
|
||||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
//! MCP functions
|
//! MCP functions
|
||||||
@ -268,6 +270,8 @@ void InitOSFunctionPointers(void)
|
|||||||
OS_FIND_EXPORT(coreinit_handle, MEMCreateExpHeapEx);
|
OS_FIND_EXPORT(coreinit_handle, MEMCreateExpHeapEx);
|
||||||
OS_FIND_EXPORT(coreinit_handle, MEMDestroyExpHeap);
|
OS_FIND_EXPORT(coreinit_handle, MEMDestroyExpHeap);
|
||||||
OS_FIND_EXPORT(coreinit_handle, MEMFreeToExpHeap);
|
OS_FIND_EXPORT(coreinit_handle, MEMFreeToExpHeap);
|
||||||
|
OS_FIND_EXPORT(coreinit_handle, OSAllocFromSystem);
|
||||||
|
OS_FIND_EXPORT(coreinit_handle, OSFreeToSystem);
|
||||||
|
|
||||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
//! Other function addresses
|
//! Other function addresses
|
||||||
|
@ -138,6 +138,8 @@ extern void *(* MEMAllocFromExpHeapEx)(s32 heap, u32 size, s32 align);
|
|||||||
extern s32 (* MEMCreateExpHeapEx)(void* address, u32 size, unsigned short flags);
|
extern s32 (* MEMCreateExpHeapEx)(void* address, u32 size, unsigned short flags);
|
||||||
extern void *(* MEMDestroyExpHeap)(s32 heap);
|
extern void *(* MEMDestroyExpHeap)(s32 heap);
|
||||||
extern void (* MEMFreeToExpHeap)(s32 heap, void* ptr);
|
extern void (* MEMFreeToExpHeap)(s32 heap, void* ptr);
|
||||||
|
extern void* (* OSAllocFromSystem)(int size, int alignment);
|
||||||
|
extern void (* OSFreeToSystem)(void *addr);
|
||||||
|
|
||||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
//! MCP functions
|
//! MCP functions
|
||||||
|
Loading…
Reference in New Issue
Block a user