简体   繁体   中英

Call Stack vs Stack and Heap in JavaScript?

I understand the Call Stack is for function calls and keeping track of execution. But I am now a little confused. Is there a Call Stack and a Stack + Heap for allocating memory as well?

Call stack and memory stack are completely different things that have only one thing similar: the word "stack"

Call stack is a list of function calls with details.

Memory stack - is a RAM area that is used for parameters, dynamic objects and variables from your functions

Memory heap - is a RAM area that is used for static variables and class variables (see the difference between class and object -> class is not the same as object)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM