| ... | @@ -358,8 +358,10 @@ pub fn remap(self: Allocator, allocation: anytype, new_len: usize) t: { | ... | @@ -358,8 +358,10 @@ pub fn remap(self: Allocator, allocation: anytype, new_len: usize) t: { |
| 358 | return mem.bytesAsSlice(T, new_memory); | 358 | return mem.bytesAsSlice(T, new_memory); |
| 359 | } | 359 | } |
| 360 | | 360 | |
| 361 | /// This function requests a new byte size for an existing allocation, which | 361 | /// This function requests a new size for an existing allocation, which |
| 362 | /// can be larger, smaller, or the same size as the old memory allocation. | 362 | /// can be larger, smaller, or the same size as the old memory allocation. |
| | 363 | /// The result is an array of `new_n` items of the same type as the existing |
| | 364 | /// allocation. |
| 363 | /// | 365 | /// |
| 364 | /// If `new_n` is 0, this is the same as `free` and it always succeeds. | 366 | /// If `new_n` is 0, this is the same as `free` and it always succeeds. |
| 365 | /// | 367 | /// |