Skip to content

Commit 6e5e7e2

Browse files
Rollup merge of rust-lang#35189 - mLuby:patch-1, r=steveklabnik
Update the-stack-and-the-heap.md Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2 parents 8a923d4 + d90c166 commit 6e5e7e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/doc/book/the-stack-and-the-heap.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The stack is very fast, and is where memory is allocated in Rust by default.
2626
But the allocation is local to a function call, and is limited in size. The
2727
heap, on the other hand, is slower, and is explicitly allocated by your
2828
program. But it’s effectively unlimited in size, and is globally accessible.
29+
Note this meaning of heap, which allocates arbitrary-sized blocks of memory in arbitrary
30+
order, is quite different from the heap data structure.
2931

3032
# The Stack
3133

0 commit comments

Comments
 (0)