diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-02-06 03:31:32 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-02-07 12:20:12 -0800 |
| commit | 51c4ffa410d2cf51b7b45dab4dfd033db2190b7e (patch) | |
| tree | a7a0427a2cf070a4b96b9a326d9c1c7d0e8555ee /lib/std/heap/debug_allocator.zig | |
| parent | 6a6e72fff820fb641aa1b00700f6835430dae72e (diff) | |
| download | zig-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.zig | 2 |
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); |
