mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 16:45:27 +00:00
std.mem.Allocator: fix not passing return_address
This makes collected stack traces omit less useful frames. For user applications which only store a fixed number of stack frames this can make a big difference.
This commit is contained in:
parent
6febe7e977
commit
3ccfd58bb6
@ -369,7 +369,7 @@ pub fn reallocAdvancedWithRetAddr(
|
||||
const Slice = @typeInfo(@TypeOf(old_mem)).Pointer;
|
||||
const T = Slice.child;
|
||||
if (old_mem.len == 0) {
|
||||
return self.allocAdvanced(T, new_alignment, new_n, exact);
|
||||
return self.allocAdvancedWithRetAddr(T, new_alignment, new_n, exact, return_address);
|
||||
}
|
||||
if (new_n == 0) {
|
||||
self.free(old_mem);
|
||||
|
Loading…
Reference in New Issue
Block a user