[commit: ghc] master: rts: detabify/dewhitespace sm/BlockAlloc.c (f20708c)

git at git.haskell.org git at git.haskell.org
Wed Aug 20 17:31:40 UTC 2014


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

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

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

commit f20708c29426310aab241b6794795429022ea464
Author: Austin Seipp <austin at well-typed.com>
Date:   Wed Aug 20 12:19:20 2014 -0500

    rts: detabify/dewhitespace sm/BlockAlloc.c
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

f20708c29426310aab241b6794795429022ea464
 rts/sm/BlockAlloc.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c
index 55310fd..681574b 100644
--- a/rts/sm/BlockAlloc.c
+++ b/rts/sm/BlockAlloc.c
@@ -329,7 +329,7 @@ alloc_mega_group (StgWord mblocks)
     else
     {
         void *mblock = getMBlocks(mblocks);
-        initMBlock(mblock);		// only need to init the 1st one
+        initMBlock(mblock);             // only need to init the 1st one
         bd = FIRST_BDESCR(mblock);
     }
     bd->blocks = MBLOCK_GROUP_BLOCKS(mblocks);
@@ -382,18 +382,18 @@ allocGroup (W_ n)
 
         bd = alloc_mega_group(1);
         bd->blocks = n;
-        initGroup(bd);		         // we know the group will fit
+        initGroup(bd);                   // we know the group will fit
         rem = bd + n;
         rem->blocks = BLOCKS_PER_MBLOCK-n;
         initGroup(rem); // init the slop
         n_alloc_blocks += rem->blocks;
-        freeGroup(rem);      	         // add the slop on to the free list
+        freeGroup(rem);                  // add the slop on to the free list
         goto finish;
     }
 
     bd = free_list[ln];
 
-    if (bd->blocks == n)	        // exactly the right size!
+    if (bd->blocks == n)                // exactly the right size!
     {
         dbl_link_remove(bd, &free_list[ln]);
         initGroup(bd);
@@ -690,7 +690,7 @@ countBlocks(bdescr *bd)
 {
     W_ n;
     for (n=0; bd != NULL; bd=bd->link) {
-	n += bd->blocks;
+        n += bd->blocks;
     }
     return n;
 }
@@ -705,12 +705,12 @@ countAllocdBlocks(bdescr *bd)
 {
     W_ n;
     for (n=0; bd != NULL; bd=bd->link) {
-	n += bd->blocks;
-	// hack for megablock groups: see (*1) above
-	if (bd->blocks > BLOCKS_PER_MBLOCK) {
-	    n -= (MBLOCK_SIZE / BLOCK_SIZE - BLOCKS_PER_MBLOCK)
-		* (bd->blocks/(MBLOCK_SIZE/BLOCK_SIZE));
-	}
+        n += bd->blocks;
+        // hack for megablock groups: see (*1) above
+        if (bd->blocks > BLOCKS_PER_MBLOCK) {
+            n -= (MBLOCK_SIZE / BLOCK_SIZE - BLOCKS_PER_MBLOCK)
+                * (bd->blocks/(MBLOCK_SIZE/BLOCK_SIZE));
+        }
     }
     return n;
 }



More information about the ghc-commits mailing list