diff options
author | daan <daanl@outlook.com> | 2019-11-21 16:28:28 -0800 |
---|---|---|
committer | daan <daanl@outlook.com> | 2019-11-21 16:28:28 -0800 |
commit | 6568059cc6eea4967f2f81f30b88c0ede380c9ee (patch) | |
tree | f895b56ea9993059466333c6ffb6c8eaef83a481 /src/alloc.c | |
parent | 049dbf41bacbf8a839551cd3e7710ffa1925b770 (diff) | |
parent | 42a0666770688c4c39197320712e9d5c9bcc9dd7 (diff) |
merge from dev
Diffstat (limited to 'src/alloc.c')
-rw-r--r-- | src/alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index c486311..e68b48d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -157,7 +157,7 @@ static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* page, con } static inline bool mi_check_is_double_free(const mi_page_t* page, const mi_block_t* block) { - mi_block_t* n = mi_block_nextx(page->cookie, block); // pretend it is freed, and get the decoded first field + mi_block_t* n = mi_block_nextx(page, block, page->cookie); // pretend it is freed, and get the decoded first field if (((uintptr_t)n & (MI_INTPTR_SIZE-1))==0 && // quick check: aligned pointer? (n==NULL || mi_is_in_same_segment(block, n))) // quick check: in same segment or NULL? { @@ -242,7 +242,7 @@ static mi_decl_noinline void _mi_free_block_mt(mi_page_t* page, mi_block_t* bloc mi_block_t* dfree; do { dfree = (mi_block_t*)heap->thread_delayed_free; - mi_block_set_nextx(heap->cookie,block,dfree); + mi_block_set_nextx(heap,block,dfree, heap->cookie); } while (!mi_atomic_cas_ptr_weak(mi_atomic_cast(void*,&heap->thread_delayed_free), block, dfree)); } |