Move sys_can_stack_trace from GPA to std.debug so that it can be re-used as needed
This commit is contained in:
@@ -19,9 +19,11 @@ pub const FailingAllocator = struct {
|
||||
freed_bytes: usize,
|
||||
allocations: usize,
|
||||
deallocations: usize,
|
||||
stack_addresses: [16]usize,
|
||||
stack_addresses: [num_stack_frames]usize,
|
||||
has_induced_failure: bool,
|
||||
|
||||
const num_stack_frames = if (std.debug.sys_can_stack_trace) 16 else 0;
|
||||
|
||||
/// `fail_index` is the number of successful allocations you can
|
||||
/// expect from this allocator. The next allocation will fail.
|
||||
/// For example, if this is called with `fail_index` equal to 2,
|
||||
|
||||
Reference in New Issue
Block a user