34 lines
827 B
C
34 lines
827 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 WP_PLATFORM_CPP
|
|
BEGIN_C_LINKAGE
|
|
#endif // !WP_PLATFORM_CPP
|
|
|
|
#if defined(WP_PLATFORM_WINDOWS)
|
|
#include "win/mem_os_win.h"
|
|
#elif defined(WP_PLATFORM_POSIX)
|
|
#include "posix/mem_os_posix.h"
|
|
#else
|
|
#error "Unrecognised platform"
|
|
#endif
|
|
|
|
void *wpOsMemAlloc(void *addr, u64 size, WpMemAccess access, WpMemAllocFlags flags, WpMemInitType type);
|
|
void wpOsMemFree(void *ptr, u64 size);
|
|
|
|
wp_extern void *_osMemAllocate(void *addr, u64 size, WpMemAccess access, WpMemAllocFlags flags, WpMemInitType type);
|
|
wp_extern void _osMemFree(void *ptr, u64 size);
|
|
|
|
#ifdef WP_PLATFORM_CPP
|
|
END_C_LINKAGE
|
|
#endif // !WP_PLATFORM_CPP
|
|
|
|
#endif // !MEM_OS_H
|