* Deallocate an existing allocation. */
| 622 | * Deallocate an existing allocation. |
| 623 | */ |
| 624 | void deallocate(Binary *B, const Alloc *a) |
| 625 | { |
| 626 | Allocator &allocator = B->allocator; |
| 627 | if (a == nullptr) |
| 628 | return; |
| 629 | Node *n = (Node *)(a); |
| 630 | assert(n->alloc.T != nullptr); |
| 631 | remove(&allocator.tree, n); |
| 632 | delete n; |
| 633 | } |
| 634 | |
| 635 | /* |
| 636 | * Iterators. |