mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-07 15:59:32 +03:00
Merge branch 'dev3' into dev3-bin
This commit is contained in:
commit
03d816d7be
1 changed files with 9 additions and 11 deletions
|
@ -176,9 +176,8 @@ void mi_free(void* p) mi_attr_noexcept
|
||||||
// page is local, but is full or contains (inner) aligned blocks; use generic path
|
// page is local, but is full or contains (inner) aligned blocks; use generic path
|
||||||
mi_free_generic_local(page, p);
|
mi_free_generic_local(page, p);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
// free-ing in a page owned by a heap in another thread, or on abandoned page (not belonging to a heap)
|
// free-ing in a page owned by a heap in another thread, or on abandoned page (not belonging to a heap)
|
||||||
if ((xtid & MI_PAGE_FLAG_MASK) == 0) { // `tid!=mi_page_thread_id(page) && mi_page_flags(page)==0`
|
else if ((xtid & MI_PAGE_FLAG_MASK) == 0) { // `tid!=mi_page_thread_id(page) && mi_page_flags(page)==0`
|
||||||
// blocks are aligned (and not a full page)
|
// blocks are aligned (and not a full page)
|
||||||
mi_block_t* const block = (mi_block_t*)p;
|
mi_block_t* const block = (mi_block_t*)p;
|
||||||
mi_free_block_mt(page,block);
|
mi_free_block_mt(page,block);
|
||||||
|
@ -188,7 +187,6 @@ void mi_free(void* p) mi_attr_noexcept
|
||||||
mi_free_generic_mt(page, p);
|
mi_free_generic_mt(page, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue