diff options
author | Ian Lynagh <igloo@earth.li> | 2009-03-06 15:51:24 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-03-06 15:51:24 +0000 |
commit | f20fe8deeee0353f8cdb27ca8031dd38b4b44ed1 (patch) | |
tree | c7282824d488877959e665c730049720f3f639ce | |
parent | ea145221cf910e20e30c0a9c47fed87be98f9621 (diff) | |
download | haskell-f20fe8deeee0353f8cdb27ca8031dd38b4b44ed1.tar.gz |
Make LDV_FILL_SLOP use a forwards loop rather than a backwards loop
-rw-r--r-- | rts/LdvProfile.h | 6 | ||||
-rw-r--r-- | rts/sm/Evac.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/rts/LdvProfile.h b/rts/LdvProfile.h index 5380c92f56..c61b0102e7 100644 --- a/rts/LdvProfile.h +++ b/rts/LdvProfile.h @@ -24,11 +24,11 @@ extern void LdvCensusKillAll ( void ); // Invoked when: // 1) Hp is incremented and exceeds HpLim (in Updates.hc). // 2) copypart() is called (in GC.c). -#define LDV_FILL_SLOP(from, howManyBackwards) \ +#define LDV_FILL_SLOP(from, howMany) \ if (era > 0) { \ int i; \ - for (i = 1;i <= (howManyBackwards); i++) \ - ((StgWord *)(from))[-i] = 0; \ + for (i = 0;i < (howMany); i++) \ + ((StgWord *)(from))[i] = 0; \ } // Informs the LDV profiler that closure c has just been evacuated. diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index 01cc0d8a36..1c453fc52e 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -212,7 +212,7 @@ spin: SET_EVACUAEE_FOR_LDV(from, size_to_reserve); // fill the slop if (size_to_reserve - size_to_copy > 0) - LDV_FILL_SLOP(to + size_to_reserve, (int)(size_to_reserve - size_to_copy)); + LDV_FILL_SLOP(to + size_to_copy, (int)(size_to_reserve - size_to_copy)); #endif return rtsTrue; |