commit | 5db22a0b70369f7c585d3fda895c910bf5d78d30 | [log] [tgz] |
---|---|---|
author | swissChili <swisschili@fastmail.com> | Wed Jun 30 22:04:33 2021 -0700 |
committer | swissChili <swisschili@fastmail.com> | Wed Jun 30 22:04:33 2021 -0700 |
tree | 7750de9b7890cdb18b6d792d72e913cc76aab916 | |
parent | b6c858cfe401188c1728fec2257bc11ce8c3ac5a [diff] |
Fix bug in GC where every 2nd alloc would leak
diff --git a/src/lisp/gc.c b/src/lisp/gc.c index b9e9574..2bdac4c 100644 --- a/src/lisp/gc.c +++ b/src/lisp/gc.c
@@ -54,11 +54,12 @@ void _sweep() { - for (struct alloc *a = first_a; a; a = a->next) + for (struct alloc *a = first_a; a;) { if (pool_alive(a->pool) || a->mark == gc_mark) { // Marked or in living pool + a = a->next; } else {