diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-03-20 15:22:57 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-03-23 12:21:53 -0400 |
| commit | 2750e3c83e7cfbad779877ac213bd815c6aa65bb (patch) | |
| tree | 2977751b279afce619a4104aff0b17caf7b559f6 /src/liballoc | |
| parent | 0834bd1b3db4e9c1477871cc962459b11e298234 (diff) | |
| download | rust-2750e3c83e7cfbad779877ac213bd815c6aa65bb.tar.gz rust-2750e3c83e7cfbad779877ac213bd815c6aa65bb.zip | |
Add note about pointer state after the call.
Fixes #23422
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/heap.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index aaf6e76237c..3733350412e 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -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. |
