projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-07-21 10:47:28 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
Storage.c
diff --git
a/ghc/rts/Storage.c
b/ghc/rts/Storage.c
index
f511b76
..
f13f186
100644
(file)
--- a/
ghc/rts/Storage.c
+++ b/
ghc/rts/Storage.c
@@
-1,5
+1,5
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.80 2003/09/23 15:38:36 simonmar Exp $
+ * $Id: Storage.c,v 1.83 2004/07/21 10:47:28 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* (c) The GHC Team, 1998-1999
*
@@
-44,7
+44,7
@@
generation *g0 = NULL; /* generation 0, for convenience */
generation *oldest_gen = NULL; /* oldest generation, for convenience */
step *g0s0 = NULL; /* generation 0, step 0, for convenience */
generation *oldest_gen = NULL; /* oldest generation, for convenience */
step *g0s0 = NULL; /* generation 0, step 0, for convenience */
-lnat total_allocated = 0; /* total memory allocated during run */
+ullong total_allocated = 0; /* total memory allocated during run */
/*
* Storage manager mutex: protects all the above state from
/*
* Storage manager mutex: protects all the above state from
@@
-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);
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;
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;
alloc_blocks += req_blocks;
RELEASE_SM_LOCK;
return bd->start;