summaryrefslogtreecommitdiff
path: root/rts/win32/OSMem.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/win32/OSMem.c')
-rw-r--r--rts/win32/OSMem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
index 716171b3fc..2d2af0ddf6 100644
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -429,11 +429,11 @@ void setExecutable (void *p, W_ len, rtsBool exec)
static void* heap_base = NULL;
-void *osReserveHeapMemory (void)
+void *osReserveHeapMemory (W_ len)
{
void *start;
- heap_base = VirtualAlloc(NULL, MBLOCK_SPACE_SIZE + MBLOCK_SIZE,
+ heap_base = VirtualAlloc(NULL, len + MBLOCK_SIZE,
MEM_RESERVE, PAGE_READWRITE);
if (heap_base == NULL) {
if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
@@ -441,7 +441,7 @@ void *osReserveHeapMemory (void)
} else {
sysErrorBelch(
"osReserveHeapMemory: VirtualAlloc MEM_RESERVE %llu bytes failed",
- MBLOCK_SPACE_SIZE + MBLOCK_SIZE);
+ len + MBLOCK_SIZE);
}
stg_exit(EXIT_FAILURE);
}