summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-04-24 07:22:42 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-04-24 07:22:42 -0700
commit7ce1bfe873576ac8ece89ff0b612bfcf623aa521 (patch)
tree78110e27649515bd30bc5db96239df1c9d22b530
parent8750696b00eb5941a033301ba84a21b944b3c563 (diff)
downloadtxr-7ce1bfe873576ac8ece89ff0b612bfcf623aa521.tar.gz
txr-7ce1bfe873576ac8ece89ff0b612bfcf623aa521.tar.bz2
txr-7ce1bfe873576ac8ece89ff0b612bfcf623aa521.zip
* gc.c (gc): Minor off-by-one: compare gc_counter to FULL_GC_INTERVAL
rather than FULL_GC_INTERVAL - 1, since it is pre-incremented.
-rw-r--r--ChangeLog5
-rw-r--r--gc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bcd20062..3bb62fec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-24 Kaz Kylheku <kaz@kylheku.com>
+
+ * gc.c (gc): Minor off-by-one: compare gc_counter to FULL_GC_INTERVAL
+ rather than FULL_GC_INTERVAL - 1, since it is pre-incremented.
+
2015-04-22 Kaz Kylheku <kaz@kylheku.com>
Switch to in-tree mpi directory.
diff --git a/gc.c b/gc.c
index 68329052..11078aaa 100644
--- a/gc.c
+++ b/gc.c
@@ -665,7 +665,7 @@ void gc(void)
printf("sweep: freed %d full_gc == %d exhausted == %d\n",
(int) swept, full_gc, exhausted);
#endif
- if (++gc_counter >= FULL_GC_INTERVAL - 1) {
+ if (++gc_counter >= FULL_GC_INTERVAL) {
full_gc_next_time = 1;
gc_counter = 0;
}