improve page flags handling

This commit is contained in:
daan 2019-08-08 17:18:49 -07:00
parent de57686dac
commit 5e56b40fe6
5 changed files with 21 additions and 15 deletions

View file

@ -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;