Improve memory-model section very slightly.
This commit is contained in:
parent
f5b2963103
commit
744085ed1d
@ -3842,8 +3842,10 @@ is to be destroyed.
|
|||||||
# Memory model
|
# Memory model
|
||||||
|
|
||||||
A Rust program's memory consists of a static set of *items* and a *heap*.
|
A Rust program's memory consists of a static set of *items* and a *heap*.
|
||||||
Immutable portions of the heap may be shared between threads, mutable portions
|
Immutable portions of the heap may be safely shared between threads, mutable
|
||||||
may not.
|
portions may not be safely shared, but several mechanisms for effectively-safe
|
||||||
|
sharing of mutable values, built on unsafe code but enforcing a safe locking
|
||||||
|
discipline, exist in the standard library.
|
||||||
|
|
||||||
Allocations in the stack consist of *variables*, and allocations in the heap
|
Allocations in the stack consist of *variables*, and allocations in the heap
|
||||||
consist of *boxes*.
|
consist of *boxes*.
|
||||||
|
Loading…
Reference in New Issue
Block a user