Add tracking allocator to test runner. #1809

This commit is contained in:
Christoffer Lerno
2025-02-09 03:10:35 +01:00
parent ce06de4b18
commit 63f619e5b6
16 changed files with 121 additions and 37 deletions

View File

@@ -113,8 +113,14 @@ fn void TrackingAllocator.clear(&self)
self.map.clear();
}
fn bool TrackingAllocator.has_leaks(&self)
{
return self.map.len() > 0;
}
fn void TrackingAllocator.print_report(&self) => self.fprint_report(io::stdout())!!;
fn void! TrackingAllocator.fprint_report(&self, OutStream out) => @pool()
{
usz total = 0;