|
|
@ -389,16 +389,16 @@ int add_new_region(Arena *arena, uintptr_t size, uintptr_t padding, uintptr_t al |
|
|
|
while (head->right != NULL) { |
|
|
|
head = head->right; |
|
|
|
} |
|
|
|
insert_right((TreeAlloc**) arena->root_freespace, (TreeAlloc*) newreg, (TreeAlloc*) head); |
|
|
|
insert_right((TreeAlloc**) &arena->root_freespace, (TreeAlloc*) newreg, (TreeAlloc*) head); |
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
printf("= POST-REGION-CREATION =\n"); |
|
|
|
printf("==== FREESPACE TREE ====\n"); |
|
|
|
debug_print_tree(0, arena->root_freespace); |
|
|
|
printf("==== TREEALLOC TREE ====\n"); |
|
|
|
debug_print_tree(0, arena->root_treealloc); |
|
|
|
printf("===== END OF TREES =====\n"); |
|
|
|
printf("= POST-REGION-CREATION =\n"); |
|
|
|
printf("==== FREESPACE TREE ====\n"); |
|
|
|
debug_print_tree(0, arena->root_freespace); |
|
|
|
printf("==== TREEALLOC TREE ====\n"); |
|
|
|
debug_print_tree(0, arena->root_treealloc); |
|
|
|
printf("===== END OF TREES =====\n"); |
|
|
|
#endif |
|
|
|
} |
|
|
|
return 1; |
|
|
|
} |
|
|
|
|
|
|
|