diff options
| author | Benjamin Feng <benjamin.feng@glassdoor.com> | 2020-01-29 17:26:10 -0600 |
|---|---|---|
| committer | Benjamin Feng <benjamin.feng@glassdoor.com> | 2020-01-29 17:38:42 -0600 |
| commit | 0c137934cbd10528c2dced898b6c5485ab528e6d (patch) | |
| tree | bb55926127481fa0a81b0c858ceeec42b8526c29 /lib/std/debug.zig | |
| parent | ffd30dbe28efce0b971d69df06ab684ceef0f881 (diff) | |
| download | zig-0c137934cbd10528c2dced898b6c5485ab528e6d.tar.gz zig-0c137934cbd10528c2dced898b6c5485ab528e6d.zip | |
Move FailingAllocator to testing
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 7e1a99a395..32aba0d9b4 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -19,8 +19,8 @@ const windows = std.os.windows; pub const leb = @import("debug/leb128.zig"); -pub const FailingAllocator = @import("debug/failing_allocator.zig").FailingAllocator; -pub const failing_allocator = &FailingAllocator.init(&global_fixed_allocator.allocator, 0).allocator; +pub const global_allocator = @compileError("Please switch to std.testing.leak_count_allocator."); +pub const failing_allocator = @compileError("Please switch to std.testing.failing_allocator."); pub const runtime_safety = switch (builtin.mode) { .Debug, .ReleaseSafe => true, @@ -2192,12 +2192,6 @@ fn readInitialLength(comptime E: type, in_stream: *io.InStream(E), is_64: *bool) } } -pub const global_allocator = blk: { - @compileError("Please switch to std.testing.leak_count_allocator."); -}; -var global_fixed_allocator = std.heap.ThreadSafeFixedBufferAllocator.init(global_allocator_mem[0..]); -var global_allocator_mem: [100 * 1024]u8 = undefined; - /// TODO multithreaded awareness var debug_info_allocator: ?*mem.Allocator = null; var debug_info_arena_allocator: std.heap.ArenaAllocator = undefined; |
