mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-09 12:58:41 +03:00
improve page flags handling
This commit is contained in:
parent
de57686dac
commit
5e56b40fe6
5 changed files with 21 additions and 15 deletions
|
@ -237,7 +237,7 @@ void mi_free(void* p) mi_attr_noexcept
|
|||
|
||||
// adjust if it might be an un-aligned block
|
||||
uintptr_t tid = _mi_thread_id();
|
||||
if (mi_likely(tid == page->flags.threadidx)) { // local, and not full or aligned
|
||||
if (mi_likely(tid == page->flags.value)) { // local, and not full or aligned
|
||||
mi_block_t* block = (mi_block_t*)p;
|
||||
mi_block_set_next(page, block, page->local_free); // note: moving this write earlier does not matter for performance
|
||||
page->local_free = block;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue