#include <v8-external-memory-accounter.h>
Public Member Functions | |
ExternalMemoryAccounter ()=default | |
~ExternalMemoryAccounter () | |
ExternalMemoryAccounter (ExternalMemoryAccounter &&) | |
ExternalMemoryAccounter & | operator= (ExternalMemoryAccounter &&) |
ExternalMemoryAccounter (const ExternalMemoryAccounter &)=delete | |
ExternalMemoryAccounter & | operator= (const ExternalMemoryAccounter &)=delete |
void | Increase (Isolate *isolate, size_t size) |
void | Update (Isolate *isolate, int64_t delta) |
void | Decrease (Isolate *isolate, size_t size) |
Static Public Member Functions | |
static int64_t | GetTotalAmountOfExternalAllocatedMemoryForTesting (const Isolate *isolate) |
This class is used to give V8 an indication of the amount of externally allocated memory that is kept alive by JavaScript objects. V8 uses this to decide when to perform garbage collections. Registering externally allocated memory will trigger garbage collections more often than it would otherwise in an attempt to garbage collect the JavaScript objects that keep the externally allocated memory alive. Instances of ExternalMemoryAccounter check that the reported external memory is back to 0 on destruction.
|
default |
v8::ExternalMemoryAccounter::~ExternalMemoryAccounter | ( | ) |
v8::ExternalMemoryAccounter::ExternalMemoryAccounter | ( | ExternalMemoryAccounter && | ) |
|
delete |
void v8::ExternalMemoryAccounter::Decrease | ( | Isolate * | isolate, |
size_t | size | ||
) |
Reports an decrease of size
bytes of external memory.
|
static |
Returns the amount of external memory registered for isolate
.
void v8::ExternalMemoryAccounter::Increase | ( | Isolate * | isolate, |
size_t | size | ||
) |
Reports an increase of size
bytes of external memory.
|
delete |
ExternalMemoryAccounter & v8::ExternalMemoryAccounter::operator= | ( | ExternalMemoryAccounter && | ) |
void v8::ExternalMemoryAccounter::Update | ( | Isolate * | isolate, |
int64_t | delta | ||
) |
Reports an update of delta
bytes of external memory.