File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 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 {
226226 /// Behaves like `grow`, but also ensures that the new contents are set to zero before being
227227 /// returned.
228228 ///
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`:
230231 /// * 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
232237 /// the size of the `MemoryBlock` returned by the `grow` call.
233238 ///
234239 /// # Safety
You can’t perform that action at this time.
0 commit comments