Skip to content

Commit 019a41b

Browse files
committed
Further revisions suggested by nmatsakis (#2990).
1 parent d9cbdf7 commit 019a41b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

doc/tutorial.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -1197,15 +1197,14 @@ Rust has three competing goals that inform its view of memory:
11971197

11981198
## How performance considerations influence the memory model
11991199

1200-
Many languages that offer the kinds of memory safety guarantees that
1201-
Rust does have a single allocation strategy: objects live on the heap,
1202-
live for as long as they are needed, and are periodically
1203-
garbage-collected. This approach is straightforward both in concept
1204-
and in implementation, but has significant costs. Languages that take
1205-
this approach tend to aggressively pursue ways to ameliorate
1206-
allocation costs (think the Java Virtual Machine). Rust supports this
1207-
strategy with _shared boxes_: memory allocated on the heap that may be
1208-
referred to (shared) by multiple variables.
1200+
Most languages that offer strong memory safety guarantees rely upon a
1201+
garbage-collected heap to manage all of the objects. This approach is
1202+
straightforward both in concept and in implementation, but has
1203+
significant costs. Languages that take this approach tend to
1204+
aggressively pursue ways to ameliorate allocation costs (think the
1205+
Java Virtual Machine). Rust supports this strategy with _shared
1206+
boxes_: memory allocated on the heap that may be referred to (shared)
1207+
by multiple variables.
12091208

12101209
By comparison, languages like C++ offer very precise control over
12111210
where objects are allocated. In particular, it is common to put them

0 commit comments

Comments
 (0)