v8 14.1.146 (node 25.0.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
IsolateGroup Class Reference

#include <v8-isolate.h>

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
 
V8_INLINE bool SandboxContains (void *pointer) const
 

Static Public Member Functions

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

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 223 of file v8-isolate.h.

Constructor & Destructor Documentation

◆ IsolateGroup() [1/2]

IsolateGroup ( IsolateGroup &&  other)

◆ IsolateGroup() [2/2]

IsolateGroup ( const IsolateGroup )

◆ ~IsolateGroup()

Member Function Documentation

◆ CanCreateNewGroups()

static bool 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.

◆ Create()

static IsolateGroup Create ( )
static

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

◆ GetDefault()

static 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.

◆ operator!=()

bool operator!= ( const IsolateGroup other) const
inline

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

References IsolateGroup::operator==().

◆ operator=() [1/2]

IsolateGroup & operator= ( const IsolateGroup )

◆ operator=() [2/2]

IsolateGroup & operator= ( IsolateGroup &&  other)

◆ operator==()

bool operator== ( const IsolateGroup other) const
inline

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

Referenced by IsolateGroup::operator!=().

◆ SandboxContains()

V8_INLINE bool SandboxContains ( void *  pointer) const
inline

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

Friends And Related Symbol Documentation

◆ ArrayBuffer::Allocator

friend class ArrayBuffer::Allocator
friend

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

◆ Isolate

friend class Isolate
friend

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


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