34 lines
850 B
C
34 lines
850 B
C
// vim:fileencoding=utf-8:foldmethod=marker
|
|
|
|
#ifndef MEM_OS_H
|
|
#define MEM_OS_H
|
|
|
|
#include "../../../common/aliases/aliases.h"
|
|
#include "../../../common/platform/platform.h"
|
|
|
|
#include "mem_os_ops.h"
|
|
|
|
#ifdef WAPP_PLATFORM_CPP
|
|
BEGIN_C_LINKAGE
|
|
#endif // !WAPP_PLATFORM_CPP
|
|
|
|
#if defined(WAPP_PLATFORM_WINDOWS)
|
|
#include "win/mem_os_win.h"
|
|
#elif defined(WAPP_PLATFORM_POSIX)
|
|
#include "posix/mem_os_posix.h"
|
|
#else
|
|
#error "Unrecognised platform"
|
|
#endif
|
|
|
|
void *wapp_mem_util_alloc(void *addr, u64 size, MemAccess access, MemAllocFlags flags, MemInitType type);
|
|
void wapp_mem_util_free(void *ptr, u64 size);
|
|
|
|
external void *mem_util_allocate(void *addr, u64 size, MemAccess access, MemAllocFlags flags, MemInitType type);
|
|
external void mem_util_free(void *ptr, u64 size);
|
|
|
|
#ifdef WAPP_PLATFORM_CPP
|
|
END_C_LINKAGE
|
|
#endif // !WAPP_PLATFORM_CPP
|
|
|
|
#endif // !MEM_OS_H
|