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:
parent
e492da2d2b
commit
502c0455a7
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue