summaryrefslogtreecommitdiffstats
path: root/gc.c
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 /gc.c
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.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
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;
}