|
@@ -23,17 +23,19 @@
|
|
|
void split(allocator_t *allocator, heap_t *heap, void *ptr,
|
|
|
size_t req_size) {
|
|
|
void *new_block;
|
|
|
- int fixed_list_id, i;
|
|
|
size_t new_block_size;
|
|
|
+#ifdef WITH_FIXED_LISTS
|
|
|
+ int fixed_list_id, i;
|
|
|
maptable_node_t *current_maptable_node;
|
|
|
+#endif /* WITH_FIXED_LISTS */
|
|
|
|
|
|
new_block = (void *) ((char *) ptr + req_size + HEADER_SIZE);
|
|
|
new_block_size = get_size(ptr) - req_size - HEADER_SIZE;
|
|
|
|
|
|
/* Resize the previous, to be used block */
|
|
|
- set_size_and_used(ptr, req_size);
|
|
|
+ set_size_and_used(allocator, ptr, req_size);
|
|
|
|
|
|
- set_size_and_free(new_block, new_block_size);
|
|
|
+ set_size_and_free(allocator, new_block, new_block_size);
|
|
|
set_previous_size_availability(new_block, get_size_availability(ptr));
|
|
|
|
|
|
#ifdef WITH_FIXED_LISTS
|