v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::IsolateGroup Class Reference

#include <v8-isolate.h>

Collaboration diagram for v8::IsolateGroup:

Public Member Functions

 IsolateGroup (IsolateGroup &&other)
 
IsolateGroupoperator= (IsolateGroup &&other)
 
 IsolateGroup (const IsolateGroup &)
 
IsolateGroupoperator= (const IsolateGroup &)
 
 ~IsolateGroup ()
 
bool operator== (const IsolateGroup &other) const
 
bool operator!= (const IsolateGroup &other) const
 

Static Public Member Functions

static IsolateGroup GetDefault ()
 
static bool CanCreateNewGroups ()
 
static IsolateGroup Create ()
 

Private Member Functions

 IsolateGroup (internal::IsolateGroup *&&isolate_group)
 

Private Attributes

internal::IsolateGroupisolate_group_
 

Friends

class Isolate
 
class ArrayBuffer::Allocator
 

Detailed Description

The set of V8 isolates in a process is partitioned into groups. Each group has its own sandbox (if V8 was configured with support for the sandbox) and pointer-compression cage (if configured with pointer compression).

By default, all isolates are placed in the same group. This is the most efficient configuration in terms of speed and memory use. However, with pointer compression enabled, total heap usage of isolates in a group cannot exceed 4 GB, not counting array buffers and other off-heap storage. Using multiple isolate groups can allow embedders to allocate more than 4GB of objects with pointer compression enabled, if the embedder's use case can span multiple isolates.

Creating an isolate group reserves a range of virtual memory addresses. A group's memory mapping will be released when the last isolate in the group is disposed, and there are no more live IsolateGroup objects that refer to it.

Note that Isolate groups are reference counted, and the IsolateGroup type is a reference to one.

Note that it's not going to be possible to pass shared JS objects across IsolateGroup boundary.

Definition at line 218 of file v8-isolate.h.

Constructor & Destructor Documentation

◆ IsolateGroup() [1/3]

v8::IsolateGroup::IsolateGroup ( IsolateGroup && other)

Definition at line 9712 of file api.cc.

Here is the caller graph for this function:

◆ IsolateGroup() [2/3]

v8::IsolateGroup::IsolateGroup ( const IsolateGroup & other)

Definition at line 9674 of file api.cc.

Here is the call graph for this function:

◆ ~IsolateGroup()

v8::IsolateGroup::~IsolateGroup ( )

Definition at line 9688 of file api.cc.

Here is the call graph for this function:

◆ IsolateGroup() [3/3]

v8::IsolateGroup::IsolateGroup ( internal::IsolateGroup *&& isolate_group)
explicitprivate

Definition at line 9669 of file api.cc.

Member Function Documentation

◆ CanCreateNewGroups()

bool v8::IsolateGroup::CanCreateNewGroups ( )
static

Return true if new isolate groups can be created at run-time, or false if all isolates must be in the same group.

Definition at line 9703 of file api.cc.

◆ Create()

IsolateGroup v8::IsolateGroup::Create ( )
static

Create a new isolate group. If this V8's build configuration only supports a single group, abort.

Definition at line 9708 of file api.cc.

Here is the call graph for this function:

◆ GetDefault()

IsolateGroup v8::IsolateGroup::GetDefault ( )
static

Get the default isolate group. If this V8's build configuration only supports a single group, this is a reference to that single group. Otherwise this is a group like any other, distinguished only in that it is the first group.

Definition at line 9698 of file api.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool v8::IsolateGroup::operator!= ( const IsolateGroup & other) const
inline

Definition at line 252 of file v8-isolate.h.

◆ operator=() [1/2]

IsolateGroup & v8::IsolateGroup::operator= ( const IsolateGroup & other)

Definition at line 9679 of file api.cc.

Here is the call graph for this function:

◆ operator=() [2/2]

IsolateGroup & v8::IsolateGroup::operator= ( IsolateGroup && other)

Definition at line 9717 of file api.cc.

◆ operator==()

bool v8::IsolateGroup::operator== ( const IsolateGroup & other) const
inline

Definition at line 248 of file v8-isolate.h.

Friends And Related Symbol Documentation

◆ ArrayBuffer::Allocator

friend class ArrayBuffer::Allocator
friend

Definition at line 258 of file v8-isolate.h.

◆ Isolate

friend class Isolate
friend

Definition at line 257 of file v8-isolate.h.

Member Data Documentation

◆ isolate_group_

internal::IsolateGroup* v8::IsolateGroup::isolate_group_
private

Definition at line 263 of file v8-isolate.h.


The documentation for this class was generated from the following files: