fix win32

This commit is contained in:
lizzie
2026-09-01 21:20:41 +00:00
parent 55a7c0e3f9
commit fe0606298e
+3 -3
View File
@@ -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;