| ... | @@ -116,9 +116,6 @@ pub const Allocator = struct { | ... | @@ -116,9 +116,6 @@ pub const Allocator = struct { |
| 116 | if (isAligned(@ptrToInt(old_mem.ptr), new_alignment)) { | 116 | if (isAligned(@ptrToInt(old_mem.ptr), new_alignment)) { |
| 117 | if (new_byte_count <= old_mem.len) { | 117 | if (new_byte_count <= old_mem.len) { |
| 118 | const shrunk_len = self.shrinkBytes(old_mem, new_byte_count, len_align); | 118 | const shrunk_len = self.shrinkBytes(old_mem, new_byte_count, len_align); |
| 119 | if (shrunk_len < old_mem.len) { | | |
| 120 | @memset(old_mem.ptr + shrunk_len, undefined, old_mem.len - shrunk_len); | | |
| 121 | } | | |
| 122 | return old_mem.ptr[0..shrunk_len]; | 119 | return old_mem.ptr[0..shrunk_len]; |
| 123 | } | 120 | } |
| 124 | if (self.callResizeFn(old_mem, new_byte_count, len_align)) |resized_len| { | 121 | if (self.callResizeFn(old_mem, new_byte_count, len_align)) |resized_len| { |