CS106B Dynamic Memory Management
An introduction to the world of dynamic memory, where we as programmers now have complete control over how computer memory is used. We create for the first time objects that can live beyond the lifespans of the functions where they are created. Lecture Video Contents 1. Overview 2. Motivation 3. Proof That Local Variables Die When We Leave a Function (Part 1 of 2) 4. Quokka Destruction: Proof That Local Variables Die When We Leave a Function (Part 2 of 2) 5. The Immortal Quokka (and C++'s new Operator) (and Dynamic Memory Allocation) 6. Memory Diagrams: Static vs. Dynamic Quokka Allocation 7. Concerns About the Immortal Quokka (and Memory Leaks!) 8. Returning Dynamically Allocated Variables from Functions 9. Super Important Rule of Thumb: For Every new, a Single delete 10. Super Important Note: Do Not Attempt to Dereference an Address After You delete It! 😳 11. Coding Tidbit: The Arrow Operator (->) 12. Array-Based Stack 13. const Member Functions 14. What's next? 15. Exercises Ove
CS106B Dynamic Memory Management Dynamic Memory Management Wednesday, July 22 An introduction to the world of dynamic memory , where we as programmers now have complete control over how computer memory is used. We create for the first time objects that can live beyond the lifespans of the functions where they are created. 📚 Readings: Text 12.1, 12.3, 14.2 📝 Lecture quiz on Canvas Contents 1. ArrayBasedStack Walkthrough 2. Overview 3. Motivation 4. Proof That Local Variables Die When We Leave a Function (Part 1 of 2) 5. Quokka Destruction: Proof That Local Variables Die When We Leave a Functi
Explore this link on the map →related reading
- Untangling Lifetimes: The Arena Allocator - by Ryan Fleurydgtlgrove.com
- CS106B Implementing VectorIntweb.stanford.edu
- What is Ownership? - The Rust Programming Languagedoc.rust-lang.org
- CS107E Assignment 4: Stack and Heapcs107e.github.io
- Dynamic allocation - Learn C - Free Interactive C Tutoriallearn-c.org
- how I think when I think about programming - alice mazalicemaz.com
- CS107 Assignment 3: A Heap of Funweb.stanford.edu
- Memory Allocation in Go | Melatoninghiant3223.github.io
- Destroy All Values: Designing Deinitialization in Programming Languages - Faultloregankra.github.io
- Moves - Rust: A Better C++ Than C++thecodedmessage.com
- References and Borrowing - The Rust Programming Languagedoc.rust-lang.org
- CS106B Classes and Dynamic Memoryweb.stanford.edu