[commit: ghc] master: Fix incorrect maxStkSize calculation (#8858) (b99ace3)

git at git.haskell.org git at git.haskell.org
Thu Mar 13 22:57:58 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b99ace39cb2484bfc2d648b55a1a43ed78e4b9a0/ghc

>---------------------------------------------------------------

commit b99ace39cb2484bfc2d648b55a1a43ed78e4b9a0
Author: Kyrill Briantsev <kyrab at mail.ru>
Date:   Thu Mar 13 17:00:17 2014 -0500

    Fix incorrect maxStkSize calculation (#8858)
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

b99ace39cb2484bfc2d648b55a1a43ed78e4b9a0
 rts/RtsFlags.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 573e701..af1b204 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_);



More information about the ghc-commits mailing list