File tree 1 file changed +8
-9
lines changed
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -1197,15 +1197,14 @@ Rust has three competing goals that inform its view of memory:
1197
1197
1198
1198
## How performance considerations influence the memory model
1199
1199
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.
1209
1208
1210
1209
By comparison, languages like C++ offer very precise control over
1211
1210
where objects are allocated. In particular, it is common to put them
You can’t perform that action at this time.
0 commit comments