Add location tracking for memory allocations.

This commit is contained in:
Christoffer Lerno
2023-11-09 11:08:36 +01:00
committed by Christoffer Lerno
parent e31f2a03ba
commit f39aa1a41e
16 changed files with 186 additions and 339 deletions

View File

@@ -36,9 +36,9 @@ struct PrivatePriorityQueue (Printable)
Heap heap;
}
fn void PrivatePriorityQueue.init_new(&self, usz initial_capacity = 16, Allocator* allocator = mem::heap()) @inline
fn void PrivatePriorityQueue.init_new(&self, usz initial_capacity = 16, Allocator* allocator = mem::heap(), TrackingEnv* env = mem::get_tracking_env()) @inline
{
self.heap.init_new(initial_capacity, allocator);
self.heap.init_new(initial_capacity, allocator, .env = env);
}
fn void PrivatePriorityQueue.init_temp(&self, usz initial_capacity = 16) @inline