No stack frame capture for non-debug modes
This commit is contained in:
parent
b7cbb10610
commit
11a5d99c93
@ -1672,7 +1672,9 @@ fn processJsonRpc(arena: *std.heap.ArenaAllocator, parser: *std.json.Parser, jso
|
|||||||
logger.debug("Method without return value not implemented: {s}", .{method});
|
logger.debug("Method without return value not implemented: {s}", .{method});
|
||||||
}
|
}
|
||||||
|
|
||||||
var gpa_state = std.heap.GeneralPurposeAllocator(.{ .stack_trace_frames = 8 }){};
|
const stack_frames = switch (std.builtin.mode) { .Debug => 10, else => 0 };
|
||||||
|
var gpa_state = std.heap.GeneralPurposeAllocator(.{ .stack_trace_frames = stack_frames }){};
|
||||||
|
|
||||||
pub fn main() anyerror!void {
|
pub fn main() anyerror!void {
|
||||||
defer _ = gpa_state.deinit();
|
defer _ = gpa_state.deinit();
|
||||||
allocator = &gpa_state.allocator;
|
allocator = &gpa_state.allocator;
|
||||||
|
Loading…
Reference in New Issue
Block a user