Переглянути джерело

Corrected the remove_block() calls.

Ioannis Koutras 14 роки тому
батько
коміт
a5426b5877
2 змінених файлів з 2 додано та 2 видалено
  1. 1 1
      src/coalesce.c
  2. 1 1
      src/custom_free.c

+ 1 - 1
src/coalesce.c

@@ -39,7 +39,7 @@ void * coalesce(void *ptr, heap_t *heap, allocator_t *allocator) {
                 current_maptable_node = current_maptable_node->next;
             }
         }
-        remove_block(ptr, current_maptable_node->fixed_list_head);
+        remove_block(&ptr, &current_maptable_node->fixed_list_head);
     }
 #endif /* WITH_FIXED_LISTS */
 

+ 1 - 1
src/custom_free.c

@@ -58,7 +58,7 @@ void custom_ahfree(allocator_t *allocator, heap_t* heap, void *ptr) {
     posix_lock(heap);
 #endif /* HAVE_LOCKS */
 
-    remove_block(ptr, heap->used_blocks_head);
+    remove_block(&ptr, &heap->used_blocks_head);
 
 #ifdef WITH_STATS
     heap->dmm_stats.mem_allocated -= size;