Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what are the stacks and heaps when it comes to computer memory architecture, i am basically java guy and i know where the objects and variables lives the thing i actually want to know that where the stacks and heaps resides in memory ?
Posted

1 solution

stack -> the area in memory where all statically declared variables are stored ( normal variables, function parameters, return values, variables inside functions etc...

heap -> the area in memory where dynamically allocated variables are stored ( the one using new keyword in c++

EDIT sorry i didn't read the question carefully :

the thing i actually want to know that where the stacks and heaps resides in memory ?

they are both in the RAM ?
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900