diff options
| author | Aidan Hobson Sayers <aidanhs@cantab.net> | 2016-03-20 23:12:20 +0000 |
|---|---|---|
| committer | Aidan Hobson Sayers <aidanhs@cantab.net> | 2016-03-20 23:12:20 +0000 |
| commit | bb43f580e5a291ee02a99b6dca6ec9b757151a19 (patch) | |
| tree | 02a30e86e779d526128e99c22386db98c2e46a8c /src | |
| parent | 2af3dd73dbc71e0f345746e123df4ac71d3f392c (diff) | |
| download | rust-bb43f580e5a291ee02a99b6dca6ec9b757151a19.tar.gz rust-bb43f580e5a291ee02a99b6dca6ec9b757151a19.zip | |
Document heap allocation location guarantee
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/reference.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 4c5fd31b96e..cdf54b39e68 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -3909,6 +3909,9 @@ The _heap_ is a general term that describes boxes. The lifetime of an allocation in the heap depends on the lifetime of the box values pointing to it. Since box values may themselves be passed in and out of frames, or stored in the heap, heap allocations may outlive the frame they are allocated within. +An allocation in the heap is guaranteed to reside at a single location in the +heap for the whole lifetime of the allocation - it will never be relocated as +a result of moving a box value. ### Memory ownership |
