[project @ 2004-04-12 12:22:45 by panne]
[ghc-hetmet.git] / ghc / rts / Storage.c
index 62a383f..fb0c016 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.79 2003/03/26 18:59:34 sof Exp $
+ * $Id: Storage.c,v 1.82 2003/10/24 09:56:45 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -475,15 +475,11 @@ allocate( nat n )
     nat req_blocks =  (lnat)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE;
     bd = allocGroup(req_blocks);
     dbl_link_onto(bd, &g0s0->large_objects);
+    g0s0->n_large_blocks += req_blocks;
     bd->gen_no  = 0;
     bd->step = g0s0;
     bd->flags = BF_LARGE;
     bd->free = bd->start + n;
-    /* don't add these blocks to alloc_blocks, since we're assuming
-     * that large objects are likely to remain live for quite a while
-     * (eg. running threads), so garbage collecting early won't make
-     * much difference.
-     */
     alloc_blocks += req_blocks;
     RELEASE_SM_LOCK;
     return bd->start;
@@ -588,7 +584,7 @@ allocatePinned( nat n )
        dbl_link_onto(bd, &g0s0->large_objects);
        bd->gen_no = 0;
        bd->step   = g0s0;
-       bd->flags  = BF_LARGE;
+       bd->flags  = BF_PINNED | BF_LARGE;
        bd->free   = bd->start;
        alloc_blocks++;
     }