projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update a comment
[ghc-hetmet.git]
/
rts
/
sm
/
Storage.c
diff --git
a/rts/sm/Storage.c
b/rts/sm/Storage.c
index
2305996
..
a14fe05
100644
(file)
--- a/
rts/sm/Storage.c
+++ b/
rts/sm/Storage.c
@@
-956,6
+956,8
@@
countOccupied(bdescr *bd)
return words;
}
return words;
}
+// Return an accurate count of the live data in the heap, excluding
+// generation 0.
lnat
calcLiveWords(void)
{
lnat
calcLiveWords(void)
{
@@
-970,9
+972,6
@@
calcLiveWords(void)
live = 0;
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
for (s = 0; s < generations[g].n_steps; s++) {
live = 0;
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
for (s = 0; s < generations[g].n_steps; s++) {
- /* approximate amount of live data (doesn't take into account slop
- * at end of each block).
- */
if (g == 0 && s == 0) continue;
stp = &generations[g].steps[s];
live += countOccupied(stp->blocks) +
if (g == 0 && s == 0) continue;
stp = &generations[g].steps[s];
live += countOccupied(stp->blocks) +