forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-lang#397 from rust-lang-nursery/memory-model
admit we don't have a memory model
- Loading branch information
Showing
1 changed file
with
3 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
# Memory model | ||
|
||
A Rust program's memory consists of a static set of *items* and a *heap*. | ||
Immutable portions of the heap may be safely shared between threads, mutable | ||
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 | ||
consist of *boxes*. | ||
Rust does not yet have a defined memory model. Various academics and industry | ||
are working on various proposals, but for now, this is an under-defined place | ||
in the language. |