X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FStorage.c;h=a14fe05072891eedabd0b72189a9f5f7164eec00;hb=2fb3d02aea564febbc0bc3e49fa2d34698c21a22;hp=230599668def061d66053c5cb791d8ffadd8e3b6;hpb=29d9667f3bed7bdfc1839411cd40aef09d4b0fc1;p=ghc-hetmet.git diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 2305996..a14fe05 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -956,6 +956,8 @@ countOccupied(bdescr *bd) return words; } +// Return an accurate count of the live data in the heap, excluding +// generation 0. 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++) { - /* 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) +