| ... | ... | @@ -23,7 +23,10 @@ pub const Allocator = struct { |
| 23 | 23 | /// * this function must return successfully. |
| 24 | 24 | /// * alignment <= alignment of old_mem.ptr |
| 25 | 25 | /// |
| 26 | | /// The returned newly allocated memory is undefined. |
| 26 | /// When `reallocFn` returns, |
| 27 | /// `return_value[0..min(old_mem.len, new_byte_count)]` must be the same |
| 28 | /// as `old_mem` was when `reallocFn` is called. The bytes of |
| 29 | /// `return_value[old_mem.len..]` have undefined values. |
| 27 | 30 | /// `alignment` is guaranteed to be >= 1 |
| 28 | 31 | /// `alignment` is guaranteed to be a power of 2 |
| 29 | 32 | reallocFn: fn (self: *Allocator, old_mem: []u8, new_byte_count: usize, alignment: u29) Error![]u8, |