1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

Fix inline old-generation check for nofl space mark byte changes

This commit is contained in:
Andy Wingo 2025-03-07 10:30:56 +01:00
parent f1b660484e
commit 4a95a514b7
6 changed files with 24 additions and 12 deletions

View file

@ -193,7 +193,9 @@ static inline int gc_object_is_old_generation(struct gc_mutator *mut,
uintptr_t granule = (addr & (alignment - 1)) / granule_size;
uint8_t *byte_loc = (uint8_t*)(base + granule);
uint8_t byte = atomic_load_explicit(byte_loc, memory_order_relaxed);
return byte & gc_old_generation_check_alloc_table_bit_pattern();
uint8_t mask = gc_old_generation_check_alloc_table_tag_mask();
uint8_t young = gc_old_generation_check_alloc_table_young_tag();
return (byte & mask) != young;
}
case GC_OLD_GENERATION_CHECK_SMALL_OBJECT_NURSERY: {
struct gc_heap *heap = gc_mutator_heap(mut);