aboutsummaryrefslogtreecommitdiff
path: root/lib/std/heap/debug_allocator.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-02-06 03:31:32 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-02-07 12:20:12 -0800
commit51c4ffa410d2cf51b7b45dab4dfd033db2190b7e (patch)
treea7a0427a2cf070a4b96b9a326d9c1c7d0e8555ee /lib/std/heap/debug_allocator.zig
parent6a6e72fff820fb641aa1b00700f6835430dae72e (diff)
downloadzig-51c4ffa410d2cf51b7b45dab4dfd033db2190b7e.tar.gz
zig-51c4ffa410d2cf51b7b45dab4dfd033db2190b7e.zip
add std.heap.SmpAllocator
An allocator intended to be used in -OReleaseFast mode when multi-threading is enabled.
Diffstat (limited to 'lib/std/heap/debug_allocator.zig')
-rw-r--r--lib/std/heap/debug_allocator.zig2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/std/heap/debug_allocator.zig b/lib/std/heap/debug_allocator.zig
index 8abf6133bf..296014aa3f 100644
--- a/lib/std/heap/debug_allocator.zig
+++ b/lib/std/heap/debug_allocator.zig
@@ -851,8 +851,6 @@ pub fn DebugAllocator(comptime config: Config) type {
self.mutex.lock();
defer self.mutex.unlock();
- assert(old_memory.len != 0);
-
const size_class_index: usize = @max(@bitSizeOf(usize) - @clz(old_memory.len - 1), @intFromEnum(alignment));
if (size_class_index >= self.buckets.len) {
@branchHint(.unlikely);