@@ -634,10 +634,10 @@ static inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* bl
634
634
mi_track_mem_defined (block,sizeof (mi_block_t ));
635
635
mi_block_t * next;
636
636
#ifdef MI_ENCODE_FREELIST
637
- next = (mi_block_t *)mi_ptr_decode (null, block->next , keys);
637
+ next = (mi_block_t *)mi_ptr_decode (null, mi_atomic_load_relaxed (& block->next ) , keys);
638
638
#else
639
639
MI_UNUSED (keys); MI_UNUSED (null);
640
- next = (mi_block_t *)block->next ;
640
+ next = (mi_block_t *)mi_atomic_load_relaxed (& block->next ) ;
641
641
#endif
642
642
mi_track_mem_noaccess (block,sizeof (mi_block_t ));
643
643
return next;
@@ -646,10 +646,10 @@ static inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* bl
646
646
static inline void mi_block_set_nextx (const void * null, mi_block_t * block, const mi_block_t * next, const uintptr_t * keys) {
647
647
mi_track_mem_undefined (block,sizeof (mi_block_t ));
648
648
#ifdef MI_ENCODE_FREELIST
649
- block->next = mi_ptr_encode (null, next, keys);
649
+ mi_atomic_store_relaxed (& block->next , mi_ptr_encode (null, next, keys) );
650
650
#else
651
651
MI_UNUSED (keys); MI_UNUSED (null);
652
- block->next = (mi_encoded_t )next;
652
+ mi_atomic_store_relaxed (& block->next , (mi_encoded_t )next) ;
653
653
#endif
654
654
mi_track_mem_noaccess (block,sizeof (mi_block_t ));
655
655
}
0 commit comments