Skip to content

Commit 90799fa

Browse files
committed
---
yaml --- r: 22650 b: refs/heads/master c: 019a41b h: refs/heads/master v: v3
1 parent eb802a7 commit 90799fa

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d9cbdf78656def0290e53353539681db612ecf1f
2+
refs/heads/master: 019a41bdb09c612e42717df2ae2148a29361842f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/doc/tutorial.md

Lines changed: 8 additions & 9 deletions
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)