summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-03-18 14:53:22 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2021-03-18 14:53:22 +0800
commit4a3c79acbf317b69382042ce983394d27ffdcfa7 (patch)
treeff0ea72b7a1bed7b834f97e040076dafc5d87978
parent302854154626ef10363afdda3ff1db7160e0827f (diff)
downloadhaskell-wip/angerman/windows-more-info.tar.gz
Add error information to osCommitMemory on failure.wip/angerman/windows-more-info
-rw-r--r--rts/win32/OSMem.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}