coreinit: Add default heap data exports.

This commit is contained in:
James Benton 2018-05-29 10:50:49 +01:00
parent c412250d48
commit 766e832363
3 changed files with 40 additions and 0 deletions

View File

@ -407,3 +407,13 @@ OSGetTitleID
// coreinit/internal.h
__os_snprintf
// ----------------------------------------------------------------------------
// Data exports
// ----------------------------------------------------------------------------
:DATA
// coreinit/defaultheap.h
MEMAllocFromDefaultHeap
MEMAllocFromDefaultHeapEx
MEMFreeToDefaultHeap

View File

@ -0,0 +1,26 @@
#pragma once
#include <wut.h>
/**
* \defgroup coreinit_defaultheap Default Heap
* \ingroup coreinit
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef void *(*MEMAllocFromDefaultHeapFn)(uint32_t size);
typedef void *(*MEMAllocFromDefaultHeapExFn)(uint32_t size, int32_t alignment);
typedef void (*MEMFreeToDefaultHeapFn)(void *ptr);
extern MEMAllocFromDefaultHeapFn MEMAllocFromDefaultHeap;
extern MEMAllocFromDefaultHeapExFn MEMAllocFromDefaultHeapEx;
extern MEMFreeToDefaultHeapFn MEMFreeToDefaultHeap;
#ifdef __cplusplus
}
#endif
/** @} */

View File

@ -176,6 +176,10 @@ SECTIONS
*(.fimport_vpad)
} > loadmem
.dimport_coreinit ALIGN(16) : {
*(.dimport_coreinit)
} > loadmem
.symtab ALIGN(4) : {
*(.symtab)
} > loadmem