summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorKyrill Briantsev <kyrab@mail.ru>2014-03-13 17:00:17 -0500
committerAustin Seipp <austin@well-typed.com>2014-03-13 17:56:36 -0500
commitb99ace39cb2484bfc2d648b55a1a43ed78e4b9a0 (patch)
tree575c7112f8cb4b5765070e2e0df084839167b890 /rts
parentb84b5da4430aacd5bf8422b06a861cd0584f99cf (diff)
downloadhaskell-b99ace39cb2484bfc2d648b55a1a43ed78e4b9a0.tar.gz
Fix incorrect maxStkSize calculation (#8858)
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts')
-rw-r--r--rts/RtsFlags.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 573e701dc7..af1b2049f6 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -97,12 +97,12 @@ void initRtsFlagsDefaults(void)
StgWord64 maxStkSize = 8 * getPhysicalMemorySize() / 10;
// if getPhysicalMemorySize fails just move along with an 8MB limit
if (maxStkSize == 0)
- maxStkSize = (8 * 1024 * 1024) / sizeof(W_);
+ maxStkSize = 8 * 1024 * 1024;
RtsFlags.GcFlags.statsFile = NULL;
RtsFlags.GcFlags.giveStats = NO_GC_STATS;
- RtsFlags.GcFlags.maxStkSize = maxStkSize;
+ RtsFlags.GcFlags.maxStkSize = maxStkSize / sizeof(W_);
RtsFlags.GcFlags.initialStkSize = 1024 / sizeof(W_);
RtsFlags.GcFlags.stkChunkSize = (32 * 1024) / sizeof(W_);
RtsFlags.GcFlags.stkChunkBufferSize = (1 * 1024) / sizeof(W_);