mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 23:39:31 +03:00
fix build error on msvc/clang-cl in C mode (issue #1060)
This commit is contained in:
parent
32788fa93f
commit
34875aef71
1 changed files with 11 additions and 11 deletions
|
@ -242,7 +242,7 @@ static mi_page_t** mi_page_map_ensure_at(size_t idx) {
|
|||
mi_memid_t memid;
|
||||
sub = (mi_page_t**)_mi_os_alloc(MI_PAGE_MAP_SUB_COUNT * sizeof(mi_page_t*), &memid);
|
||||
mi_page_t** expect = NULL;
|
||||
if (!mi_atomic_cas_strong_acq_rel(((_Atomic(mi_page_t**)*)&_mi_page_map[idx]), &expect, sub)) {
|
||||
if (!mi_atomic_cas_ptr_strong_acq_rel(mi_page_t*, ((_Atomic(mi_page_t**)*)&_mi_page_map[idx]), &expect, sub)) {
|
||||
// another thread already allocated it.. free and continue
|
||||
_mi_os_free(sub, MI_PAGE_MAP_SUB_COUNT * sizeof(mi_page_t*), memid);
|
||||
sub = expect;
|
||||
|
|
Loading…
Add table
Reference in a new issue