1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 11:40:20 +02:00

Fix mark-sweep allocator to clear contents

This commit is contained in:
Andy Wingo 2022-03-11 11:23:43 +01:00
parent e492da2d2b
commit 502c0455a7

View file

@ -384,6 +384,7 @@ static void* allocate_large(struct context *cx, enum alloc_kind kind,
unlink_large_object(prev, large);
split_large_object(cx, large, granules);
large->tag = tag_live(GCOBJ, kind);
large->next = NULL;
return large;
}
}
@ -451,6 +452,7 @@ static inline void* allocate_small(struct context *cx,
struct gcobj_free *ret = *loc;
*loc = ret->next;
ret->tag = tag_live(GCOBJ, alloc_kind);
ret->next = NULL;
return (void *) ret;
}