mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add location tracking for memory allocations.
This commit is contained in:
committed by
Christoffer Lerno
parent
e31f2a03ba
commit
f39aa1a41e
@@ -78,9 +78,9 @@ fn usz! Object.to_format(&self, Formatter* formatter) @dynamic
|
||||
}
|
||||
}
|
||||
|
||||
fn Object* new_obj(Allocator* allocator)
|
||||
fn Object* new_obj(Allocator* allocator, TrackingEnv* env = mem::get_tracking_env())
|
||||
{
|
||||
Object* o = allocator.new(Object);
|
||||
Object* o = allocator.new(Object, .env = env);
|
||||
*o = { .allocator = allocator, .type = void.typeid };
|
||||
return o;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user