Skip to content

Commit

Permalink
Added minor clarification to specification of realloc.
Browse files Browse the repository at this point in the history
The `layout` for the returned allocation of a `realloc` is
only implicitly specified.  This change makes it explicit.
  • Loading branch information
mjp41 committed Jan 20, 2020
1 parent 900811e commit 6be3446
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,8 @@ pub unsafe trait GlobalAlloc {
/// The memory may or may not have been deallocated,
/// and should be considered unusable (unless of course it was
/// transferred back to the caller again via the return value of
/// this method).
/// this method). The new memory block is allocated with `layout`, but
/// with the `size` updated to `new_size`.
///
/// If this method returns null, then ownership of the memory
/// block has not been transferred to this allocator, and the
Expand Down

0 comments on commit 6be3446

Please sign in to comment.