Update buffer.c

This commit is contained in:
恍兮惚兮 2024-03-22 16:34:40 +08:00
parent b61d265408
commit 18b93df55d

View File

@ -217,6 +217,12 @@ static PMEMORY_BLOCK GetMemoryBlock(LPVOID pOrigin)
break;
}
}
if (pBlock == NULL)
{
pBlock=(PMEMORY_BLOCK)VirtualAlloc(
(LPVOID)minAddr, MEMORY_BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
}
#else
// In x86 mode, a memory block can be placed anywhere.
pBlock = (PMEMORY_BLOCK)VirtualAlloc(