From 86c7886b62c994b0297561f976ad687864f596c5 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 23 Dec 2024 10:54:15 +0100 Subject: [PATCH] Fix allocations --- src/windows-emulator/syscalls.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index ccabbe91..fe6caa01 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -1748,7 +1748,9 @@ namespace return STATUS_NOT_SUPPORTED; } - const auto allocation_bytes = bytes_to_allocate.read(); + auto allocation_bytes = bytes_to_allocate.read(); + allocation_bytes = page_align_up(allocation_bytes); + bytes_to_allocate.write(allocation_bytes); const auto protection = map_nt_to_emulator_protection(page_protection);