Commit 5ed9db73 authored by Simon Marlow's avatar Simon Marlow
Browse files

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.
parent 4adc53ff
......@@ -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(); \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment