From 71e609fb1e60cf13035c69c179e3ec722b2e26c4 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Thu, 18 Mar 2021 14:53:22 +0800 Subject: Add error information to osCommitMemory on failure. --- rts/win32/OSMem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c index 138660a879..dde1a74bbb 100644 --- a/rts/win32/OSMem.c +++ b/rts/win32/OSMem.c @@ -474,7 +474,7 @@ void osCommitMemory (void *at, W_ size) void *temp; temp = VirtualAlloc(at, size, MEM_COMMIT, PAGE_READWRITE); if (temp == NULL) { - sysErrorBelch("osCommitMemory: VirtualAlloc MEM_COMMIT failed"); + sysErrorBelch("osCommitMemory: VirtualAlloc MEM_COMMIT failed to commit %" FMT_Word " bytes of memory (error code: %lu)", size, GetLastError()); stg_exit(EXIT_HEAPOVERFLOW); } } -- cgit v1.2.1