![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <v8-isolate.h>
Public Member Functions | |
IsolateGroup (IsolateGroup &&other) | |
IsolateGroup & | operator= (IsolateGroup &&other) |
IsolateGroup (const IsolateGroup &) | |
IsolateGroup & | operator= (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::IsolateGroup * | isolate_group_ |
Friends | |
class | Isolate |
class | ArrayBuffer::Allocator |
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.
v8::IsolateGroup::IsolateGroup | ( | IsolateGroup && | other | ) |
v8::IsolateGroup::IsolateGroup | ( | const IsolateGroup & | other | ) |
v8::IsolateGroup::~IsolateGroup | ( | ) |
|
explicitprivate |
|
static |
|
static |
|
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.
|
inline |
Definition at line 252 of file v8-isolate.h.
IsolateGroup & v8::IsolateGroup::operator= | ( | const IsolateGroup & | other | ) |
IsolateGroup & v8::IsolateGroup::operator= | ( | IsolateGroup && | other | ) |
|
inline |
Definition at line 248 of file v8-isolate.h.
|
friend |
Definition at line 258 of file v8-isolate.h.
|
friend |
Definition at line 257 of file v8-isolate.h.
|
private |
Definition at line 263 of file v8-isolate.h.