Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 625 Bytes

memory.md

File metadata and controls

24 lines (15 loc) · 625 Bytes

Overview

  1. TODO

Key Concepts

  1. All values in Rust are stack allocated by default
  2. All heap access happens thru a pointer

Stack

  1. Size must be known at compile time to live on stack
  2. Pointers have fixed size (their subject lives on the heap)

Heap

  1. All heap access happens thru a pointer

Other Resources

  1. https://doc.rust-lang.org/rust-by-example/std/box.html
  2. https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/book/first-edition/the-stack-and-the-heap.html
  3. https://nnethercote.github.io/perf-book/heap-allocations.html
  4. https://os.phil-opp.com/heap-allocation/