What is stack memory | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 1

What is stack memory

8th Aug 2017, 3:50 PM
Dheeraj Yadav
Dheeraj Yadav - avatar
2 Réponses
+ 1
static memory stores all the local variables and the function calls made in a program. Normal variable declarations like, int a; int b[5]; happen in Stack Memory during compile time. Stack Memory is generally small in size(usually less than 8MB).Small size of the Stack Memory leads to memory overflow in situations where we try to use large amount of space(declare really large arrays or an array of a structure) or in recursive programs where the depth of recursion becomes really large( because function calls are also stored in the Stack Memory)
8th Aug 2017, 3:57 PM
Nirmal Kumar Bhakat
Nirmal Kumar Bhakat - avatar