Replace alloc/free function export by data exports as function pointers.

This commit is contained in:
Maschell 2020-06-10 15:33:15 +02:00
parent 640e8935c1
commit e27ca247ae
2 changed files with 10 additions and 5 deletions

View File

@ -7,14 +7,14 @@ extern "C"
#include <cstdint> #include <cstdint>
extern void MemoryMappingFree(void* ptr);
extern void* MemoryMappingAlloc(uint32_t size, uint32_t align);
extern uint32_t MemoryMappingEffectiveToPhysical(uint32_t address); extern uint32_t MemoryMappingEffectiveToPhysical(uint32_t address);
extern uint32_t MemoryMappingPhysicalToEffective(uint32_t address); extern uint32_t MemoryMappingPhysicalToEffective(uint32_t address);
extern void *(*MEMAllocFromMappedMemory)(uint32_t size);
extern void *(*MEMAllocFromMappedMemoryEx)(uint32_t size, int32_t alignment);
extern void (*MEMFreeToMappedMemory)(void *ptr);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif

View File

@ -5,3 +5,8 @@ MemoryMappingFree
MemoryMappingAlloc MemoryMappingAlloc
MemoryMappingEffectiveToPhysical MemoryMappingEffectiveToPhysical
MemoryMappingPhysicalToEffective MemoryMappingPhysicalToEffective
:DATA
MEMAllocFromMappedMemory
MEMAllocFromMappedMemoryEx
MEMFreeToMappedMemory