mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-05 15:56:49 +00:00
Import VirtualAlloc2 if available (Win10+)
Import MapViewOfFile3 as well. Unused, this crap is tricky.
This commit is contained in:
parent
bd5253047b
commit
dcbe8ef5f4
@ -2,6 +2,7 @@
|
||||
#include "util/logs.hpp"
|
||||
#include "util/vm.hpp"
|
||||
#ifdef _WIN32
|
||||
#include "util/dyn_lib.hpp"
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
@ -30,6 +31,11 @@ static int memfd_create_(const char *name, uint flags)
|
||||
|
||||
namespace utils
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DYNAMIC_IMPORT("KernelBase.dll", VirtualAlloc2, PVOID(HANDLE Process, PVOID Base, SIZE_T Size, ULONG AllocType, ULONG Prot, MEM_EXTENDED_PARAMETER*, ULONG));
|
||||
DYNAMIC_IMPORT("KernelBase.dll", MapViewOfFile3, PVOID(HANDLE Handle, HANDLE Process, PVOID Base, ULONG64 Off, SIZE_T ViewSize, ULONG AllocType, ULONG Prot, MEM_EXTENDED_PARAMETER*, ULONG));
|
||||
#endif
|
||||
|
||||
// Convert memory protection (internal)
|
||||
static auto operator +(protection prot)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user