authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-11 14:05:28-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-11 14:05:28-07:00
log60ce5edaf9f9bd9c500eb74d6e775baa7867ed84
tree7c6ce67c5e86a002b734653dabd71e2ec24d83d2
parent3ccfd58bb6765bcb6c586e91fd638a8117b4634f

GeneralPurposeAllocator: default to store more stack frames in test mode

Now tests will by default store 8 stack frames per allocation rather than the normal default of 4.

1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/heap/general_purpose_allocator.zig+2-1
......@@ -118,7 +118,8 @@ const sys_can_stack_trace = switch (std.Target.current.cpu.arch) {
118118
119119 else => true,
120120};
121const default_sys_stack_trace_frames: usize = if (sys_can_stack_trace) 4 else 0;
121const default_test_stack_trace_frames: usize = if (std.builtin.is_test) 8 else 4;
122const default_sys_stack_trace_frames: usize = if (sys_can_stack_trace) default_test_stack_trace_frames else 0;
122123const default_stack_trace_frames: usize = switch (std.builtin.mode) {
123124 .Debug => default_sys_stack_trace_frames,
124125 else => 0,