Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QV4::GCCriticalSection< ToBeMarked > Struct Template Reference

#include <qv4mm_p.h>

+ Collaboration diagram for QV4::GCCriticalSection< ToBeMarked >:

Public Member Functions

Q_NODISCARD_CTOR GCCriticalSection (QV4::ExecutionEngine *engine, ToBeMarked *toBeMarked=nullptr)
 
 ~GCCriticalSection ()
 

Detailed Description

template<typename ToBeMarked = void>
struct QV4::GCCriticalSection< ToBeMarked >

GCCriticalSection prevets the gc from running, until it is destructed. In its dtor, it runs a check whether we've reached the unmanaegd heap limit, and triggers a gc run if necessary. Lastly, it can optionally mark an object passed to it before runnig the gc.

Definition at line 446 of file qv4mm_p.h.

Constructor & Destructor Documentation

◆ GCCriticalSection()

template<typename ToBeMarked = void>
Q_NODISCARD_CTOR QV4::GCCriticalSection< ToBeMarked >::GCCriticalSection ( QV4::ExecutionEngine * engine,
ToBeMarked * toBeMarked = nullptr )
inline

Definition at line 449 of file qv4mm_p.h.

References QV4::MemoryManager::InCriticalSection, and Q_ASSERT.

◆ ~GCCriticalSection()

template<typename ToBeMarked = void>
QV4::GCCriticalSection< ToBeMarked >::~GCCriticalSection ( )
inline

Definition at line 457 of file qv4mm_p.h.

References QV4::MemoryManager::gcBlocked, QV4::MemoryManager::isAboveUnmanagedHeapLimit(), QV4::EngineBase::isGCOngoing, QV4::MemoryManager::markStack(), QV4::EngineBase::memoryManager, Q_ASSERT, QV4::MemoryManager::runGC(), QV4::MemoryManager::tryForceGCCompletion(), and QV4::MemoryManager::Unblocked.

+ Here is the call graph for this function:

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