MCPcopy Create free account
hub / github.com/GJDuck/e9patch / deallocate

Function deallocate

src/e9patch/e9alloc.cpp:624–633  ·  view source on GitHub ↗

* Deallocate an existing allocation. */

Source from the content-addressed store, hash-verified

622 * Deallocate an existing allocation.
623 */
624void 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.

Callers 1

undoFunction · 0.85

Calls 1

removeFunction · 0.70

Tested by

no test coverage detected