On Wed, May 16, 2018 at 2:35 PM, Luo Wu <lwye...@pku.edu.cn> wrote:
> Hi guys,
>
> I am a freshman to learn chromium and v8. I know that the main thread in the
> renderer process is bound to an Isolate in v8, and an Isolate can possess
> several contexts. But I am confused about the memory layout of the main
> thread in the renderer process.
>
> I want to know how v8 manages the heap and stack for a given context. Does
> all codes(including the v8 code and JS code in different context) have the
> same stack? And if they have different stacks, how v8 maintains these
> stacks, for example, by changing the esp register? And what about the heap
> for different contexts?
>
> Any ideas are appreciated. Thank you.

They all use the same heap and stack.

The heap is a per-isolate property.  It has to be or contexts couldn't
touch each other's objects.

The machine code that V8 emits uses the thread's stack (i.e., the C
stack), no stack swapping takes place.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to