[commit: ghc] master: Fix variable name in allocate() (70b24c0)

git at git.haskell.org git at git.haskell.org
Tue Jul 1 18:52:44 UTC 2014


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

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

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

commit 70b24c0217ea219813b7e8c1b3c92d189900bb3a
Author: Reid Barton <rwbarton at gmail.com>
Date:   Tue Jul 1 14:00:28 2014 -0400

    Fix variable name in allocate()


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

70b24c0217ea219813b7e8c1b3c92d189900bb3a
 rts/sm/Storage.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index d002fec..379d9da 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -686,12 +686,12 @@ StgPtr allocate (Capability *cap, W_ n)
     CCS_ALLOC(cap->r.rCCCS,n);
     
     if (n >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) {
-        // The largest number of bytes such that
+        // The largest number of words such that
         // the computation of req_blocks will not overflow.
-        W_ max_bytes = (HS_WORD_MAX & ~(BLOCK_SIZE-1)) / sizeof(W_);
+        W_ max_words = (HS_WORD_MAX & ~(BLOCK_SIZE-1)) / sizeof(W_);
         W_ req_blocks;
 
-        if (n > max_bytes)
+        if (n > max_words)
             req_blocks = HS_WORD_MAX; // signal overflow below
         else
             req_blocks = (W_)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE;



More information about the ghc-commits mailing list