From 4c7450b93715f192dddd68a5f37ebe6831df7493 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 9 Feb 2025 11:01:52 +0100 Subject: [PATCH] Log allocations --- src/windows-emulator/syscalls.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index 82567f8f..0fe24a59 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -2102,6 +2102,8 @@ namespace if (!potential_base) { + c.win_emu.log.print(color::dark_gray, "--> Not allocated\n"); + return STATUS_MEMORY_NOT_ALLOCATED; } @@ -2117,9 +2119,15 @@ namespace if (commit && !reserve && c.emu.commit_memory(potential_base, allocation_bytes, protection)) { + c.win_emu.log.print(color::dark_gray, "--> Committed 0x%" PRIx64 " - 0x%" PRIx64 "\n", potential_base, + potential_base + allocation_bytes); + return STATUS_SUCCESS; } + c.win_emu.log.print(color::dark_gray, "--> Allocated 0x%" PRIx64 " - 0x%" PRIx64 "\n", potential_base, + potential_base + allocation_bytes); + return c.emu.allocate_memory(potential_base, allocation_bytes, protection, !commit) ? STATUS_SUCCESS : STATUS_MEMORY_NOT_ALLOCATED;