Lets the block cache understand the unified address space option

There is a limitation that all executable code must live above the
memory base at this moment
This commit is contained in:
Ryan Houdek authored and Stefanos Kornilios Mitsis Poiitidis committed 2020-03-06 07:56:16 +02:00
1 parent 692a93c604
commit d5402bce2b
2 files changed
+18 -1

No files matched your search

+3
View File
@@ -28,6 +28,9 @@ BlockCache::BlockCache(FEXCore::Context::Context *CTX)
// Can end up being inefficient if we compile a small number of blocks per page
PageMemory = reinterpret_cast<uintptr_t>(mmap(nullptr, CODE_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));
LogMan::Throw::A(PageMemory != -1ULL, "Failed to allocate page memory");
MemoryBase = ctx->MemoryMapper.GetBaseOffset<uintptr_t>(0);
VirtualMemSize = ctx->Config.VirtualMemSize;
}
BlockCache::~BlockCache() {