BudgetAllocatorDeinit
Description
Tear down a BudgetAllocator. No-op for the backing memory (the caller owns it); resets internal bookkeeping so subsequent dispatch calls will trip the magic check.
Parameters
| Name | Direction | Description |
|---|---|---|
self |
in,out | BudgetAllocator instance. |
Success
Function returns. Internal state is zeroed.
Failure
No action when self is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
}
BudgetAllocatorDeinit(&bp);
return ok;
} ok = ok && (overflow == NULL);
BudgetAllocatorDeinit(&bp);
return ok;
}
AllocatorFree(alloc, b, sizeof(Node));
BudgetAllocatorDeinit(&bp);
return ok;
} bool ok = (big == NULL);
BudgetAllocatorDeinit(&bp);
return ok;
} AllocatorFree(alloc, p2, sizeof(int));
}
BudgetAllocatorDeinit(&bp);
return ok;
} bool ok = (bp.slot_count == 0);
BudgetAllocatorDeinit(&bp);
return ok;
}- In
Budget.c:143:
}
void BudgetAllocatorDeinit(BudgetAllocator *self) {
if (!self) {
return;
Last updated on