Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx#134238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
corona10 merged 1 commit intopython:mainfromcorona10:gh-129748
May 20, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletionsInclude/internal/mimalloc/mimalloc/internal.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -634,10 +634,10 @@ static inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* bl
mi_track_mem_defined(block,sizeof(mi_block_t));
mi_block_t* next;
#ifdef MI_ENCODE_FREELIST
next = (mi_block_t*)mi_ptr_decode(null, block->next, keys);
next = (mi_block_t*)mi_ptr_decode(null,mi_atomic_load_relaxed(&block->next), keys);
#else
MI_UNUSED(keys); MI_UNUSED(null);
next = (mi_block_t*)block->next;
next = (mi_block_t*)mi_atomic_load_relaxed(&block->next);
#endif
mi_track_mem_noaccess(block,sizeof(mi_block_t));
return next;
Expand All@@ -646,10 +646,10 @@ static inline mi_block_t* mi_block_nextx( const void* null, const mi_block_t* bl
static inline void mi_block_set_nextx(const void* null, mi_block_t* block, const mi_block_t* next, const uintptr_t* keys) {
mi_track_mem_undefined(block,sizeof(mi_block_t));
#ifdef MI_ENCODE_FREELIST
block->next =mi_ptr_encode(null, next, keys);
mi_atomic_store_relaxed(&block->next,mi_ptr_encode(null, next, keys));
#else
MI_UNUSED(keys); MI_UNUSED(null);
block->next =(mi_encoded_t)next;
mi_atomic_store_relaxed(&block->next,(mi_encoded_t)next);
#endif
mi_track_mem_noaccess(block,sizeof(mi_block_t));
}
Expand Down
2 changes: 1 addition & 1 deletionInclude/internal/mimalloc/mimalloc/types.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -235,7 +235,7 @@ typedef size_t mi_threadid_t;

// free lists contain blocks
typedefstructmi_block_s {
mi_encoded_tnext;
_Atomic(mi_encoded_t)next;
}mi_block_t;


Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp