File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -226,9 +226,14 @@ pub unsafe trait AllocRef {
226
226
/// Behaves like `grow`, but also ensures that the new contents are set to zero before being
227
227
/// returned.
228
228
///
229
- /// The memory block will contain the following contents after a successful call to `grow`:
229
+ /// The memory block will contain the following contents after a successful call to
230
+ /// `grow_zeroed`:
230
231
/// * Bytes `0..layout.size()` are preserved from the original allocation.
231
- /// * Bytes `layout.size()..new_size` are zeroed. `new_size` refers to
232
+ /// * Bytes `layout.size()..old_size` will either be preserved or zeroed,
233
+ /// depending on the allocator implementation. `old_size` refers to the size of
234
+ /// the `MemoryBlock` prior to the `grow_zeroed` call, which may be larger than the size
235
+ /// that was originally requested when it was allocated.
236
+ /// * Bytes `old_size..new_size` are zeroed. `new_size` refers to
232
237
/// the size of the `MemoryBlock` returned by the `grow` call.
233
238
///
234
239
/// # Safety
You can’t perform that action at this time.
0 commit comments