Browse Source

Fixed a bug involving the wrong indirection level in a pointer

Thomas Johnson 5 months ago
parent
commit
843edec232
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      tree_alloc.c

+ 8
- 8
tree_alloc.c View File

@@ -389,16 +389,16 @@ int add_new_region(Arena *arena, uintptr_t size, uintptr_t padding, uintptr_t al
389 389
       while (head->right != NULL) {
390 390
         head = head->right;
391 391
       }
392
-      insert_right((TreeAlloc**) arena->root_freespace, (TreeAlloc*) newreg, (TreeAlloc*) head);
392
+      insert_right((TreeAlloc**) &arena->root_freespace, (TreeAlloc*) newreg, (TreeAlloc*) head);
393
+    }
393 394
 #ifdef DEBUG
394
-      printf("= POST-REGION-CREATION =\n");
395
-      printf("==== FREESPACE TREE ====\n");
396
-      debug_print_tree(0, arena->root_freespace);
397
-      printf("==== TREEALLOC TREE ====\n");
398
-      debug_print_tree(0, arena->root_treealloc);
399
-      printf("===== END OF TREES =====\n");
395
+    printf("= POST-REGION-CREATION =\n");
396
+    printf("==== FREESPACE TREE ====\n");
397
+    debug_print_tree(0, arena->root_freespace);
398
+    printf("==== TREEALLOC TREE ====\n");
399
+    debug_print_tree(0, arena->root_treealloc);
400
+    printf("===== END OF TREES =====\n");
400 401
 #endif
401
-    }
402 402
     return 1;
403 403
 }
404 404
 

Loading…
Cancel
Save