This commit is contained in:
Nekotekina 2014-08-31 13:54:12 +04:00
parent 26e03fa794
commit 571bd63644
7 changed files with 313 additions and 211 deletions

View file

@ -1,4 +1,20 @@
#include "stdafx.h"
#include "Memory.h"
#ifdef _WIN32
#include <Windows.h>
static void* const m_base_addr = VirtualAlloc(nullptr, 0x100000000, MEM_RESERVE, PAGE_NOACCESS);
#else
#include <sys/mman.h>
/* OS X uses MAP_ANON instead of MAP_ANONYMOUS */
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
static void* const m_base_addr = ::mmap(nullptr, 0x100000000, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
#endif
namespace vm
{
@ -28,13 +44,4 @@ namespace vm
void unalloc(u32 addr)
{
}
u32 read32(u32 addr)
{
return 0;
}
void write32(u32 addr, u32 value)
{
}
}