Browse Source

Update set_size_and_used() and set_size_and_free() calls to use the allocator argument.

Ioannis Koutras 13 years ago
parent
commit
c60c7e5bae
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/coalesce.c
  2. 1 1
      src/sys_alloc.c

+ 1 - 1
src/coalesce.c

@@ -44,7 +44,7 @@ void * coalesce(void *ptr, heap_t *heap, allocator_t *allocator) {
 
     // Set the new size
     // Note: the rest of the header variables will be set on free().
-    set_size_and_free(prev, get_size(prev) + get_size(ptr) + HEADER_SIZE);
+    set_size_and_free(allocator, prev, get_size(prev) + get_size(ptr) + HEADER_SIZE);
 
     /* If the current block is the allocator's border pointer, update the
      * latter to point to the previous block.

+ 1 - 1
src/sys_alloc.c

@@ -97,7 +97,7 @@ void *sys_alloc(allocator_t *allocator, heap_t *heap, size_t size) {
     allocator->border_ptr = ptr;
 
     /* Set some values for block header */
-    set_size_and_used(ptr, req_padding(size));
+    set_size_and_used(allocator, ptr, req_padding(size));
     set_previous_size_availability(ptr, previous_size_availability);
 
 #ifdef FUTURE_FEATURES