v8 10.2.154 (node 18.16.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
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
 
virtual CustomSpaceIndex GetCustomSpaceIndex () const =0
 
virtual bool IsCompactable () const =0
 

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()

template<typename ConcreteCustomSpace >
CustomSpaceIndex GetCustomSpaceIndex ( ) const
inlinefinalvirtual

Implements CustomSpaceBase.

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

◆ IsCompactable()

template<typename ConcreteCustomSpace >
bool IsCompactable ( ) const
inlinefinalvirtual

Implements CustomSpaceBase.

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

Field Documentation

◆ kSupportsCompaction

template<typename ConcreteCustomSpace >
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: