| author | |
| committer | |
| log | 46d84a1b639eb8e2c11b1936e6897a6352802325 |
| tree | 699fc0f2a72a5f9ac657c505b1dbcf26bd3e4d7a |
| parent | c1fb97aef6d0f7343e9226b2f19fbe9d315afa94 |
4 files changed, 5 insertions(+), 5 deletions(-)
lib/std/heap/logging_allocator.zig+1-1| ... | @@ -57,7 +57,7 @@ test "LoggingAllocator" { | ... | @@ -57,7 +57,7 @@ test "LoggingAllocator" { |
| 57 | var slice_stream = std.io.SliceOutStream.init(buf[0..]); | 57 | var slice_stream = std.io.SliceOutStream.init(buf[0..]); |
| 58 | const stream = &slice_stream.stream; | 58 | const stream = &slice_stream.stream; |
| 59 | 59 | ||
| 60 | const allocator = &LoggingAllocator.init(std.heap.page_allocator, @ptrCast(*AnyErrorOutStream, stream)).allocator; | 60 | const allocator = &LoggingAllocator.init(std.testing.allocator, @ptrCast(*AnyErrorOutStream, stream)).allocator; |
| 61 | 61 | ||
| 62 | const ptr = try allocator.alloc(u8, 10); | 62 | const ptr = try allocator.alloc(u8, 10); |
| 63 | allocator.free(ptr); | 63 | allocator.free(ptr); |
lib/std/testing.zig+1-1| ... | @@ -12,7 +12,7 @@ pub var allocator_instance = LeakCountAllocator.init(&base_allocator_instance.al | ... | @@ -12,7 +12,7 @@ pub var allocator_instance = LeakCountAllocator.init(&base_allocator_instance.al |
| 12 | pub const failing_allocator = &FailingAllocator.init(&base_allocator_instance.allocator, 0).allocator; | 12 | pub const failing_allocator = &FailingAllocator.init(&base_allocator_instance.allocator, 0).allocator; |
| 13 | 13 | ||
| 14 | pub var base_allocator_instance = std.heap.ThreadSafeFixedBufferAllocator.init(allocator_mem[0..]); | 14 | pub var base_allocator_instance = std.heap.ThreadSafeFixedBufferAllocator.init(allocator_mem[0..]); |
| 15 | var allocator_mem: [100 * 1024]u8 = undefined; | 15 | var allocator_mem: [512 * 1024]u8 = undefined; |
| 16 | 16 | ||
| 17 | /// This function is intended to be used only in tests. It prints diagnostics to stderr | 17 | /// This function is intended to be used only in tests. It prints diagnostics to stderr |
| 18 | /// and then aborts when actual_error_union is not expected_error. | 18 | /// and then aborts when actual_error_union is not expected_error. |
test/cli.zig+1-1| ... | @@ -8,7 +8,7 @@ const ChildProcess = std.ChildProcess; | ... | @@ -8,7 +8,7 @@ const ChildProcess = std.ChildProcess; |
| 8 | var a: *std.mem.Allocator = undefined; | 8 | var a: *std.mem.Allocator = undefined; |
| 9 | 9 | ||
| 10 | pub fn main() !void { | 10 | pub fn main() !void { |
| 11 | var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); | 11 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 12 | defer arena.deinit(); | 12 | defer arena.deinit(); |
| 13 | 13 | ||
| 14 | var arg_it = process.args(); | 14 | var arg_it = process.args(); |
test/stage1/behavior/async_fn.zig+2-2| ... | @@ -935,12 +935,12 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { | ... | @@ -935,12 +935,12 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { |
| 935 | _ = async amain(&result); | 935 | _ = async amain(&result); |
| 936 | return result; | 936 | return result; |
| 937 | } else { | 937 | } else { |
| 938 | return fib(std.heap.page_allocator, 10) catch unreachable; | 938 | return fib(std.testing.allocator, 10) catch unreachable; |
| 939 | } | 939 | } |
| 940 | } | 940 | } |
| 941 | 941 | ||
| 942 | fn amain(result: *u32) void { | 942 | fn amain(result: *u32) void { |
| 943 | var x = async fib(std.heap.page_allocator, 10); | 943 | var x = async fib(std.testing.allocator, 10); |
| 944 | result.* = (await x) catch unreachable; | 944 | result.* = (await x) catch unreachable; |
| 945 | } | 945 | } |
| 946 | }; | 946 | }; |