summaryrefslogtreecommitdiff
path: root/includes/Cmm.h
diff options
context:
space:
mode:
authorNicolas Frisby <nicolas.frisby@gmail.com>2013-04-04 22:20:27 +0100
committerNicolas Frisby <nicolas.frisby@gmail.com>2013-04-11 12:15:04 +0100
commit155d943cbbe0ee8c3443bb76c74dff99355b55aa (patch)
tree8904ac20b60e7984dac752c3ac0f1842cd93a26f /includes/Cmm.h
parent27cf625ab871f34434d9fe86cecf85a31f73f0e5 (diff)
downloadhaskell-155d943cbbe0ee8c3443bb76c74dff99355b55aa.tar.gz
added ticky counters for heap and stack checks
Diffstat (limited to 'includes/Cmm.h')
-rw-r--r--includes/Cmm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 7e051c1a30..89baaa0987 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -373,6 +373,7 @@
CCCS_ALLOC(bytes);
#define HEAP_CHECK(bytes,failure) \
+ TICK_BUMP(HEAP_CHK_ctr); \
Hp = Hp + (bytes); \
if (Hp > HpLim) { HpAlloc = (bytes); failure; } \
TICK_ALLOC_HEAP_NOCTR(bytes);
@@ -476,6 +477,7 @@
}
#define STK_CHK(n, fun) \
+ TICK_BUMP(STK_CHK_ctr); \
if (Sp - (n) < SpLim) { \
GC_PRIM(fun) \
}