From 2d0547dcafaa158845fa71b8d4fa08a526714430 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:40:17 -0400 Subject: [PATCH] Remove unneeded call to `min` At this point, we know we're expanding the wide slab, so `old_size` will always be the right size. --- base/runtime/heap_allocator_implementation.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/runtime/heap_allocator_implementation.odin b/base/runtime/heap_allocator_implementation.odin index 7b9c67495..719895ef4 100644 --- a/base/runtime/heap_allocator_implementation.odin +++ b/base/runtime/heap_allocator_implementation.odin @@ -1834,7 +1834,7 @@ heap_resize :: proc "contextless" (old_ptr: rawptr, old_size: int, new_size: int if heap_superpage_index_slab(superpage, i).bin_size != 0 { // Contiguous space is unavailable. new_ptr = heap_alloc(new_size, zero_memory) - intrinsics.mem_copy_non_overlapping(new_ptr, old_ptr, min(old_size, new_size)) + intrinsics.mem_copy_non_overlapping(new_ptr, old_ptr, old_size) heap_free(old_ptr) heap_debug_cover(.Resize_Wide_Slab_Failed_To_Find_Contiguous_Expansion) return