File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -315,16 +315,16 @@ static inline union heap_entry *heap_freeblocks_merge(union heap_entry *node) {
315315 // after : [prev + node + next]
316316
317317 union heap_entry * prev = heap_prev_block (node );
318- union heap_entry * next = heap_prev_block (node );
319- if (prev == HEAP_BLOCK_FREE ) {
318+ union heap_entry * next = heap_next_block (node );
319+ if (prev -> content . state == HEAP_BLOCK_FREE ) {
320320 // merge
321321 prev -> content .size += node -> content .size ;
322322 next -> content .prev_size = prev -> content .size ;
323323 node = prev ;
324324 }
325- if (next == HEAP_BLOCK_FREE ) {
325+ if (next -> content . state == HEAP_BLOCK_FREE ) {
326326 // merge
327- union heap_entry * next_2 = heap_prev_block (next );
327+ union heap_entry * next_2 = heap_next_block (next );
328328 node -> content .size += next -> content .size ;
329329 next_2 -> content .prev_size = node -> content .size ;
330330 }
You can’t perform that action at this time.
0 commit comments