Add Leak Detection to Ona Heap Allocator #15
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "ona-allocator-safety-tracker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #12.
Also fixed a few undetected leaks and incorrect size signings on allocations in the process of implementing this.
WIP: Add Leak Detection to Ona Heap Allocatorto Add Leak Detection to Ona Heap Allocator@ -188,0 +176,4 @@var interned_iterable = InternTable.Iterable{.hashed_map = &self.interned};while (interned_iterable.next()) |entry| {self.discard(.{.object = entry.value});Perhaps
discardcould have an internal complimentary function specifically for discarding objects to save on the effort of wrapping a known type in a discriminated union only to unwrap it again back to the known type.@ -188,2 +183,4 @@self.interned.deinit(self.allocator);self.values.deinit(self.allocator);self.calls.deinit(self.allocator);self.heap.deinit(self.allocator);May be worth adding an assert to check that the VM environment heap is empty by now before calling deinit.