aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-01-30 10:01:40 -0500
committerGitHub <noreply@github.com>2020-01-30 10:01:40 -0500
commit65b1a4953fd5b87f30260beb363d0e968dc8e291 (patch)
treeab01d1b6699d103b4b075807f47c136926404f92 /lib/std/debug.zig
parente3a383a661aaf9b43016358e2951ff9d792f240e (diff)
parent9c196efa2afe0e337ac0b16bd1138e89393f6106 (diff)
downloadzig-65b1a4953fd5b87f30260beb363d0e968dc8e291.tar.gz
zig-65b1a4953fd5b87f30260beb363d0e968dc8e291.zip
Merge pull request #4324 from fengb/testing-allocator
Remove debug.global_allocator in favor of testing.allocator
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 28340fede2..3af2a5c417 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_allocator, 0).allocator;
+pub const global_allocator = @compileError("Please switch to std.testing.allocator.");
+pub const failing_allocator = @compileError("Please switch to std.testing.failing_allocator.");
pub const runtime_safety = switch (builtin.mode) {
.Debug, .ReleaseSafe => true,
@@ -2196,11 +2196,6 @@ fn readInitialLength(comptime E: type, in_stream: *io.InStream(E), is_64: *bool)
}
}
-/// This should only be used in temporary test programs.
-pub const global_allocator = &global_fixed_allocator.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;