mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-12 00:35:19 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user