aboutsummaryrefslogtreecommitdiff
path: root/lib/std/heap/debug_allocator.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-02-08 04:54:38 -0800
committerGitHub <noreply@github.com>2025-02-08 04:54:38 -0800
commitea1ce2df9b20b5c91278eb0ed99a9cd0b0949e1a (patch)
treea3456166f71ca3a8dc56c99da9452ef3ffb4aa25 /lib/std/heap/debug_allocator.zig
parent3fe981e1ad746f9e3dfa2006fc69c907c92ddce6 (diff)
parent975cd9fc4ff8c12ae1f54e470b72be04d26e0837 (diff)
downloadzig-ea1ce2df9b20b5c91278eb0ed99a9cd0b0949e1a.tar.gz
zig-ea1ce2df9b20b5c91278eb0ed99a9cd0b0949e1a.zip
Merge pull request #22808 from ziglang/fast-gpa
introduce std.heap.SmpAllocator
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);