Skip to content

Commit 3318caa

Browse files
yoneymeta-codesync[bot]
authored andcommitted
Fix VirtualAlloc for Windows build
Reviewed By: DinoV Differential Revision: D91710318 fbshipit-source-id: 7e7d21bd9518d83c3b6807672e6613626b49d5b5
1 parent 4ec59b2 commit 3318caa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cinderx/Jit/code_allocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ uint8_t* allocPages(size_t size) {
4545
"Failed to allocate {} bytes of memory for code",
4646
size);
4747
#else
48-
void* res = VirtualAllocEx(
49-
nullptr, nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
48+
void* res = VirtualAlloc(
49+
nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
5050
JIT_CHECK(
5151
res != nullptr, "Failed to allocate {} bytes of memory for code", size);
5252
#endif

0 commit comments

Comments
 (0)