Skip to content
0:00 / 0:00

#stackmemory#heapmemory#memoryallocation

Stack Memory & Heap Memory | What is The Difference Between Stacks and Heaps?

Algonique

8.3K subscribers • 1 video on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.

Beginner. No background in the topic needed.

37K views7 years ago1 recommendation

Computer scienceSystems programmingMemory managementData structures

An explanation of how stack and heap memory work, how variables are allocated, and the differences between them.

🎁 FREE Algorithms Interview Questions Course - bit.ly/3s37wON 🎁 FREE Machine Learning Course - bit.ly/3oY4aLi 🎁 FREE Python Programming Course - bit.ly/3JJMHOD 📱 FREE Algorithms Visualization App - bit.ly/algorhyme-app In this lecture we are going to discuss stack memory and heap memory. These are crucial concepts in computer science and software engineering. Stack memory: local variables and function calls are stored on the stack memory. The size of the stack memory is usually small BUT on the other hand it is quite fast. If we instantiate a new object then the reference itself is pushed onto the stack but the object itself is present on the heap memory. Heap memory: it is slower than the stack memory but the size of the heap is far greater than the size of the stack memory. Objects are stored on the heap memory. ✅ Facebook: facebook.com/globalsoftwarealgorithms/ ✅ Instagram: instagram.com/global.software.algorithms

Why it's here

1 person recommends this

What people say. Recommended as a concise and clear explanation of stack versus heap memory allocation.

u/jimmyayoin r/dotnet • Recommends

One of the best, concise explanations I've see (8 min.) of how your code's methods, objects and variables are allocated in stack vs heap memory.