v8  10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
CustomSpace< ConcreteCustomSpace > Class Template Reference

#include <custom-space.h>

Inheritance diagram for CustomSpace< ConcreteCustomSpace >:
Collaboration diagram for CustomSpace< ConcreteCustomSpace >:

Public Member Functions

CustomSpaceIndex GetCustomSpaceIndex () const final
 
bool IsCompactable () const final
 
- Public Member Functions inherited from CustomSpaceBase
virtual ~CustomSpaceBase ()=default
 

Static Public Attributes

static constexpr bool kSupportsCompaction = false
 

Detailed Description

template<typename ConcreteCustomSpace>
class cppgc::CustomSpace< ConcreteCustomSpace >

Base class custom spaces should directly inherit from. The class inheriting from CustomSpace must define kSpaceIndex as unique space index. These indices need for form a sequence starting at 0.

Example:

class CustomSpace1 : public CustomSpace<CustomSpace1> {
public:
static constexpr CustomSpaceIndex kSpaceIndex = 0;
};
class CustomSpace2 : public CustomSpace<CustomSpace2> {
public:
static constexpr CustomSpaceIndex kSpaceIndex = 1;
};

Definition at line 49 of file custom-space.h.

Member Function Documentation

◆ GetCustomSpaceIndex()

CustomSpaceIndex GetCustomSpaceIndex ( ) const
inlinefinalvirtual

Implements CustomSpaceBase.

Definition at line 57 of file custom-space.h.

◆ IsCompactable()

bool IsCompactable ( ) const
inlinefinalvirtual

Implements CustomSpaceBase.

Definition at line 60 of file custom-space.h.

Field Documentation

◆ kSupportsCompaction

constexpr bool kSupportsCompaction = false
staticconstexpr

Compaction is only supported on spaces that manually manage slots recording.

Definition at line 55 of file custom-space.h.


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