Is the memory structure different for each programming language?

Viewed 55

I learned memory structure of C language. There are code, data, stack, heap area for each purpose. And Os give a process only one code, data, heap area. So all thread share these in the same process. But stack is not shared. Threads have their own stack area. This is a brief summary of the knowledge I know about memory structure with process. I have thought that these four areas exist in any process.

But, I'm confused this structure when I see components of v8 engine.

V8 engine introduce only two components( call stack, heap ).

And people explain call stack a little differently than stack of c.

Stack of c is explained as a memory in which local value is. Also, The stack area traditionally adjoined the heap and grew in the opposite direction. when the stack pointer met the heap pointer, free memory was exhausted.

However, call stack is described by frame that is about functions. When a function execute, a frame come in the call stack. The explanation is ambiguous. Because stack of c is explained in terms of memory. But call stack is not. I want to know that how the frame or call stack relate to physical memory.

So, my questions are

  1. Is the memory structure different for each programming language?

  2. If 1 is right, where are local values which is in a function(frame) located? ex) heap, ....

  3. Where are global variables located?

  4. Could you recommend any document to release my curiosity?

Thank you.

0 Answers
Related