summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-16 16:05:00 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-16 16:05:00 +0000
commit5ed9db738f05bcc8a855e2ddd5f3ad243a22e0a8 (patch)
tree3b3065c3f1dac722aa05b31e83fc7e1313143e25
parent4adc53ff5eb66b6beef9b38e18f23d00de2d56b4 (diff)
downloadhaskell-5ed9db738f05bcc8a855e2ddd5f3ad243a22e0a8.tar.gz
Retract Hp *before* checking for HpLim==0
Fixes heapprof001(prof_hp) following the recent HpLim patch, which depended on the lack of slop in the heap.
-rw-r--r--rts/HeapStackCheck.cmm2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
index 10baca23c6..1533ae0617 100644
--- a/rts/HeapStackCheck.cmm
+++ b/rts/HeapStackCheck.cmm
@@ -63,11 +63,11 @@ import LeaveCriticalSection;
#define GC_GENERIC \
DEBUG_ONLY(foreign "C" heapCheckFail()); \
if (Hp > HpLim) { \
+ Hp = Hp - HpAlloc/*in bytes*/; \
if (HpLim == 0) { \
R1 = ThreadYielding; \
goto sched; \
} \
- Hp = Hp - HpAlloc/*in bytes*/; \
if (HpAlloc <= BLOCK_SIZE \
&& bdescr_link(CurrentNursery) != NULL) { \
CLOSE_NURSERY(); \