v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
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
 

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

Constructor & Destructor Documentation

◆ IsolateGroup() [1/2]

◆ IsolateGroup() [2/2]

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

References IsolateGroup().

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

References IsolateGroup().

◆ operator!=()

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

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

References IsolateGroup(), and operator==().

◆ operator=() [1/2]

IsolateGroup & operator= ( const IsolateGroup & )

References IsolateGroup().

◆ operator=() [2/2]

IsolateGroup & operator= ( IsolateGroup && other)

References IsolateGroup().

◆ operator==()

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

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

References IsolateGroup().

Referenced by operator!=().

Friends And Related Symbol Documentation

◆ ArrayBuffer::Allocator

friend class ArrayBuffer::Allocator
friend

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

References IsolateGroup().

◆ Isolate

friend class Isolate
friend

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

References Isolate.

Referenced by Isolate.


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