]> git.lizzy.rs Git - rust.git/commitdiff
Add note about pointer state after the call.
authorSteve Klabnik <steve@steveklabnik.com>
Fri, 20 Mar 2015 19:22:57 +0000 (15:22 -0400)
committerSteve Klabnik <steve@steveklabnik.com>
Mon, 23 Mar 2015 16:21:53 +0000 (12:21 -0400)
Fixes #23422

src/liballoc/heap.rs

index aaf6e76237ca5669b7d6266f4b4ff853ed7dfec0..3733350412e499a8c4d3623cf6fea8aeea403bc6 100644 (file)
@@ -26,6 +26,9 @@ pub unsafe fn allocate(size: usize, align: usize) -> *mut u8 {
 ///
 /// On failure, return a null pointer and leave the original allocation intact.
 ///
+/// If the allocation was relocated, the memory at the passed-in pointer is
+/// undefined after the call.
+///
 /// Behavior is undefined if the requested size is 0 or the alignment is not a
 /// power of 2. The alignment must be no larger than the largest supported page
 /// size on the platform.