mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Fix a case where we might miss some sweeping
Unlike next_hole, next_hole_in_block doesn't finish_hole, so it doesn't clear metadata bits. Fix to always finish_hole when finish_sweeping_in_block.
This commit is contained in:
parent
40be1a03cb
commit
adaffab3da
1 changed files with 2 additions and 4 deletions
|
@ -2185,15 +2185,13 @@ static size_t next_hole(struct gc_mutator *mut) {
|
|||
}
|
||||
|
||||
static void finish_sweeping_in_block(struct gc_mutator *mut) {
|
||||
while (next_hole_in_block(mut))
|
||||
finish_hole(mut);
|
||||
do { finish_hole(mut); } while (next_hole_in_block(mut));
|
||||
}
|
||||
|
||||
// Another thread is triggering GC. Before we stop, finish clearing the
|
||||
// dead mark bytes for the mutator's block, and release the block.
|
||||
static void finish_sweeping(struct gc_mutator *mut) {
|
||||
while (next_hole(mut))
|
||||
finish_hole(mut);
|
||||
while (next_hole(mut)) {}
|
||||
}
|
||||
|
||||
static void trigger_collection(struct gc_mutator *mut,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue