Skip to content
Permalink
Browse files

Improve memory-model section very slightly.

  • Loading branch information
graydon committed Apr 18, 2015
1 parent f5b2963 commit 744085ed1dad34a865a78b57ecdbb2849a7b1b87
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/doc/reference.md
@@ -3842,8 +3842,10 @@ is to be destroyed.
# Memory model

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
may not.
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*.

0 comments on commit 744085e

Please sign in to comment.
You can’t perform that action at this time.