projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Retract Hp *before* checking for HpLim==0
[ghc-hetmet.git]
/
rts
/
HeapStackCheck.cmm
diff --git
a/rts/HeapStackCheck.cmm
b/rts/HeapStackCheck.cmm
index
10baca2
..
1533ae0
100644
(file)
--- 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) { \
#define GC_GENERIC \
DEBUG_ONLY(foreign "C" heapCheckFail()); \
if (Hp > HpLim) { \
+ Hp = Hp - HpAlloc/*in bytes*/; \
if (HpLim == 0) { \
R1 = ThreadYielding; \
goto sched; \
} \
if (HpLim == 0) { \
R1 = ThreadYielding; \
goto sched; \
} \
- Hp = Hp - HpAlloc/*in bytes*/; \
if (HpAlloc <= BLOCK_SIZE \
&& bdescr_link(CurrentNursery) != NULL) { \
CLOSE_NURSERY(); \
if (HpAlloc <= BLOCK_SIZE \
&& bdescr_link(CurrentNursery) != NULL) { \
CLOSE_NURSERY(); \