The explanations of "Isolate" what I found so far.
exp #1: http://izs.me/v8-docs/classv8_1_1Isolate.html
"Isolate represents an isolated instance of the V8 engine. V8 isolates have completely separate states. Objects from one isolate must not be used in other isolates. When V8 is initialized a default isolate is implicitly created and entered. The embedder can create additional isolates and use them in parallel in multiple threads. An isolate can be entered by at most one thread at any given time. The Locker/Unlocker API can be used to synchronize."
exp #2: https://developers.google.com/v8/get_started
"An isolate is a VM instance with its own heap."
OK, I see. "Isolate" is an isolate thread that can operate seperately. Followings are my questions.
It looks like just thread for me, except that it has its own heap. is there any difference?
I think "Isolate" can be used for implementing concurrent GC. The definition above says that each "Isolate" cannot be used in other "Isolate". But concurrent GC should check(or mark) the main(or other) thread(or Isolate)'s live objects. How can it be possible?
How can it be possible to protect their own objects? "Isolate" is a thread not a process. So other thread can access that thread's object if it knows the address. How could protect it? And I cannot understand the meaning of own heap. Because it can be accessed by other thread if other thread knows the address. And normal thread can have their heap in memory space. Since address space of heap is not seperated exactly but if one thread malloc a memory, how could other thread use it unless others know the address? What's the difference each thread just malloc their own heap space and "Isolate" have its own heap space?
My questions can be easily summarized that what is the role of the "Isolate" and how can it be possible to have their own heap space and why does it have to have its own heap.
It will be very helpful if someone shares some good documentations of "Isolate". Thanks for reading.
---- Make the question clear ---- The key point of my question is that Q: What makes google to implement isolate in V8? what's the benefit of isolate and what would be a good example of using isolate in V8? What are they(isolates) executing concurrently?