[commit: ghc] ghc-7.8: Fix incorrect maxStkSize calculation (#8858) (880d813)

git at git.haskell.org git at git.haskell.org
Mon Mar 17 15:36:52 UTC 2014


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

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/880d81339a6bbc2d147fe72c1ea59070dd6a9b30/ghc

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

commit 880d81339a6bbc2d147fe72c1ea59070dd6a9b30
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>
    (cherry picked from commit b99ace39cb2484bfc2d648b55a1a43ed78e4b9a0)


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

880d81339a6bbc2d147fe72c1ea59070dd6a9b30
 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