Skip to content

Commit 78fd7ce

Browse files
[3.14] gh-134875: Fix mimallc build error for the old compilers (gh-134994) (gh-135053)
gh-134875: Fix mimallc build error for the old compilers (gh-134994) (cherry picked from commit b525e31) Co-authored-by: Donghee Na <[email protected]>
1 parent d420d82 commit 78fd7ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/internal/mimalloc/mimalloc/internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,10 @@ static inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* bl
634634
mi_track_mem_defined(block,sizeof(mi_block_t));
635635
mi_block_t* next;
636636
#ifdef MI_ENCODE_FREELIST
637-
next = (mi_block_t*)mi_ptr_decode(null, mi_atomic_load_relaxed(&block->next), keys);
637+
next = (mi_block_t*)mi_ptr_decode(null, mi_atomic_load_relaxed((_Atomic(mi_encoded_t)*)&block->next), keys);
638638
#else
639639
MI_UNUSED(keys); MI_UNUSED(null);
640-
next = (mi_block_t*)mi_atomic_load_relaxed(&block->next);
640+
next = (mi_block_t*)mi_atomic_load_relaxed((_Atomic(mi_encoded_t)*)&block->next);
641641
#endif
642642
mi_track_mem_noaccess(block,sizeof(mi_block_t));
643643
return next;

0 commit comments

Comments
 (0)