mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Fix bug clearing field set
This commit is contained in:
parent
da4f1ec806
commit
cff99c75a8
1 changed files with 5 additions and 3 deletions
|
@ -148,14 +148,16 @@ gc_field_set_clear(struct gc_field_set *set,
|
||||||
// wanted to it could re-add an edge to the remembered set.
|
// wanted to it could re-add an edge to the remembered set.
|
||||||
set->partly_full.list.head = NULL;
|
set->partly_full.list.head = NULL;
|
||||||
set->full.head = NULL;
|
set->full.head = NULL;
|
||||||
struct gc_edge_buffer *buf;
|
struct gc_edge_buffer *buf, *next;
|
||||||
for (buf = partly_full; buf; buf = buf->next) {
|
for (buf = partly_full; buf; buf = next) {
|
||||||
|
next = buf->next;
|
||||||
for (size_t i = 0; i < buf->size; i++)
|
for (size_t i = 0; i < buf->size; i++)
|
||||||
forget_edge(buf->edges[i], heap);
|
forget_edge(buf->edges[i], heap);
|
||||||
buf->size = 0;
|
buf->size = 0;
|
||||||
gc_edge_buffer_list_push(&set->empty, buf);
|
gc_edge_buffer_list_push(&set->empty, buf);
|
||||||
}
|
}
|
||||||
for (buf = full; buf; buf = buf->next) {
|
for (buf = full; buf; buf = next) {
|
||||||
|
next = buf->next;
|
||||||
for (size_t i = 0; i < buf->size; i++)
|
for (size_t i = 0; i < buf->size; i++)
|
||||||
forget_edge(buf->edges[i], heap);
|
forget_edge(buf->edges[i], heap);
|
||||||
buf->size = 0;
|
buf->size = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue