mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-16 00:31:12 +00:00
fix win32
This commit is contained in:
@@ -141,10 +141,10 @@ void InitSwap() noexcept {}
|
|||||||
|
|
||||||
void* AllocateMemoryPages(std::size_t size) noexcept {
|
void* AllocateMemoryPages(std::size_t size) noexcept {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void* base = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
void* addr = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||||
if (base == nullptr) {
|
if (addr == nullptr) {
|
||||||
// Probably failing to reserve is less likely than failing to commit
|
// Probably failing to reserve is less likely than failing to commit
|
||||||
base = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
|
addr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
|
||||||
}
|
}
|
||||||
#elif defined(__OPENORBIS__)
|
#elif defined(__OPENORBIS__)
|
||||||
bool use_void_mem = true;
|
bool use_void_mem = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user