summaryrefslogtreecommitdiffstats
path: root/byterun/gc_ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/gc_ctrl.c')
-rw-r--r--byterun/gc_ctrl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/byterun/gc_ctrl.c b/byterun/gc_ctrl.c
index 8950bb662..07cfc26d2 100644
--- a/byterun/gc_ctrl.c
+++ b/byterun/gc_ctrl.c
@@ -127,7 +127,10 @@ static value heap_stats (int returnstats)
free_words = 0, free_blocks = 0, largest_free = 0,
fragments = 0, heap_chunks = 0;
char *chunk = caml_heap_start, *chunk_end;
- char *cur_hp, *prev_hp;
+ char *cur_hp;
+#ifdef DEBUG
+ char *prev_hp;
+#endif
header_t cur_hd;
#ifdef DEBUG
@@ -137,7 +140,9 @@ static value heap_stats (int returnstats)
while (chunk != NULL){
++ heap_chunks;
chunk_end = chunk + Chunk_size (chunk);
+#ifdef DEBUG
prev_hp = NULL;
+#endif
cur_hp = chunk;
while (cur_hp < chunk_end){
cur_hd = Hd_hp (cur_hp);
@@ -192,7 +197,9 @@ static value heap_stats (int returnstats)
*/
break;
}
+#ifdef DEBUG
prev_hp = cur_hp;
+#endif
cur_hp = Next (cur_hp);
} Assert (cur_hp == chunk_end);
chunk = Chunk_next (chunk);