mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Import VirtualAlloc2 if available (Win10+)
Import MapViewOfFile3 as well. Unused, this crap is tricky.
This commit is contained in:
parent
bd5253047b
commit
dcbe8ef5f4
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include "util/logs.hpp"
|
#include "util/logs.hpp"
|
||||||
#include "util/vm.hpp"
|
#include "util/vm.hpp"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#include "util/dyn_lib.hpp"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
@ -30,6 +31,11 @@ static int memfd_create_(const char *name, uint flags)
|
||||||
|
|
||||||
namespace utils
|
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)
|
// Convert memory protection (internal)
|
||||||
static auto operator +(protection prot)
|
static auto operator +(protection prot)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue