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

#include <v8-platform.h>

Collaboration diagram for v8::ThreadIsolatedAllocator:

Public Types

enum class  Type { kPkey }
 

Public Member Functions

virtual ~ThreadIsolatedAllocator ()=default
 
virtual void * Allocate (size_t size)=0
 
virtual void Free (void *object)=0
 
virtual Type Type () const =0
 
virtual int Pkey () const
 

Static Public Member Functions

static void SetDefaultPermissionsForSignalHandler ()
 

Detailed Description

An allocator that uses per-thread permissions to protect the memory.

The implementation is platform/hardware specific, e.g. using pkeys on x64.

INTERNAL ONLY: This interface has not been stabilised and may change without notice from one release to another without being deprecated first.

Definition at line 640 of file v8-platform.h.

Member Enumeration Documentation

◆ Type

Enumerator
kPkey 

Definition at line 648 of file v8-platform.h.

Constructor & Destructor Documentation

◆ ~ThreadIsolatedAllocator()

virtual v8::ThreadIsolatedAllocator::~ThreadIsolatedAllocator ( )
virtualdefault

Member Function Documentation

◆ Allocate()

virtual void * v8::ThreadIsolatedAllocator::Allocate ( size_t size)
pure virtual
Here is the caller graph for this function:

◆ Free()

virtual void v8::ThreadIsolatedAllocator::Free ( void * object)
pure virtual
Here is the caller graph for this function:

◆ Pkey()

virtual int v8::ThreadIsolatedAllocator::Pkey ( ) const
inlinevirtual

Return the pkey used to implement the thread isolation if Type == kPkey.

Definition at line 657 of file v8-platform.h.

Here is the caller graph for this function:

◆ SetDefaultPermissionsForSignalHandler()

void v8::ThreadIsolatedAllocator::SetDefaultPermissionsForSignalHandler ( )
static

Per-thread permissions can be reset on signal handler entry. Even reading ThreadIsolated memory will segfault in that case. Call this function on signal handler entry to ensure that read permissions are restored.

Definition at line 309 of file v8.cc.

Here is the call graph for this function:

◆ Type()

virtual Type v8::ThreadIsolatedAllocator::Type ( ) const
pure virtual

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