Document heap allocation location guarantee

This commit is contained in:
Aidan Hobson Sayers 2016-03-20 23:12:20 +00:00
parent 2af3dd73db
commit bb43f580e5
1 changed files with 3 additions and 0 deletions

View File

@ -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