![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qv4mm_p.h>
Classes | |
| struct | ObjectsForCompilationUnit |
Public Types | |
| enum | Blockness : quint8 { Unblocked , NormalBlocked , InCriticalSection } |
Public Member Functions | |
| MemoryManager (ExecutionEngine *engine) | |
| ~MemoryManager () | |
| template<typename ManagedType> | |
| ManagedType::Data * | allocManaged (std::size_t size, Heap::InternalClass *ic) |
| template<typename ManagedType> | |
| ManagedType::Data * | allocManaged (Heap::InternalClass *ic) |
| template<typename ManagedType> | |
| ManagedType::Data * | allocManaged (std::size_t size, InternalClass *ic) |
| template<typename ManagedType> | |
| ManagedType::Data * | allocManaged (InternalClass *ic) |
| template<typename ManagedType> | |
| ManagedType::Data * | allocManaged (std::size_t size) |
| template<typename ManagedType> | |
| ManagedType::Data * | allocManaged () |
| template<typename ObjectType> | |
| ObjectType::Data * | allocateObject (Heap::InternalClass *ic) |
| template<typename ObjectType> | |
| ObjectType::Data * | allocateObject (InternalClass *ic) |
| template<typename ObjectType> | |
| ObjectType::Data * | allocateObject () |
| template<typename ManagedType, typename Arg1> | |
| ManagedType::Data * | allocWithStringData (std::size_t unmanagedSize, Arg1 &&arg1) |
| template<typename ObjectType, typename... Args> | |
| ObjectType::Data * | allocObject (Heap::InternalClass *ic, Args &&... args) |
| template<typename ObjectType, typename... Args> | |
| ObjectType::Data * | allocObject (InternalClass *ic, Args &&... args) |
| template<typename ObjectType, typename... Args> | |
| ObjectType::Data * | allocate (Args &&... args) |
| template<typename ManagedType, typename... Args> | |
| ManagedType::Data * | alloc (Args &&... args) |
| void | runGC () |
| bool | tryForceGCCompletion () |
| void | runFullGC () |
| void | dumpStats () const |
| size_t | getRegularItemsMem () const |
| size_t | getAllocatedMem () const |
| size_t | getLargeItemsMem () const |
| void | changeUnmanagedHeapSizeUsage (qptrdiff delta) |
| void | updateUnmanagedHeapSizeGCLimit () |
| template<typename ManagedType> | |
| ManagedType::Data * | allocIC () |
| void | registerWeakMap (Heap::MapObject *map) |
| void | registerWeakSet (Heap::SetObject *set) |
| void | onEventLoop () |
| void | setGCTimeLimit (int timeMs) |
| MarkStack * | markStack () |
| std::vector< QObject * > | findObjectsForCompilationUnits (std::vector< QQmlRefPointer< CompiledData::CompilationUnit > > &&units) |
| void | collectFromJSStack (MarkStack *markStack) const |
| void | sweep (bool lastSweep=false) |
| void | cleanupDeletedQObjectWrappersInSweep () |
| bool | isAboveUnmanagedHeapLimit () |
Static Public Member Functions | |
| static constexpr std::size_t | align (std::size_t size) |
Protected Member Functions | |
| Heap::Base * | allocString (std::size_t unmanagedSize) |
| expects size to be aligned | |
| Heap::Base * | allocData (std::size_t size) |
| Heap::Object * | allocObjectWithMemberData (const QV4::VTable *vtable, uint nMembers) |
Friends | |
| template<typename ToBeMarked> | |
| struct | GCCriticalSection |
| QV4::MemoryManager::MemoryManager | ( | ExecutionEngine * | engine | ) |
|
inlinestaticconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 272 of file qv4mm_p.h.
References QV4::Q_STATIC_ASSERT(), and QV4::Heap::InternalClass::vtable.
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
inline |
| void QV4::MemoryManager::cleanupDeletedQObjectWrappersInSweep | ( | ) |
| std::vector< QObject * > QV4::MemoryManager::findObjectsForCompilationUnits | ( | std::vector< QQmlRefPointer< CompiledData::CompilationUnit > > && | units | ) |
|
inline |
| void QV4::MemoryManager::registerWeakMap | ( | Heap::MapObject * | map | ) |
| void QV4::MemoryManager::registerWeakSet | ( | Heap::SetObject * | set | ) |
| bool QV4::MemoryManager::tryForceGCCompletion | ( | ) |
Precondition: Incremental garbage collection must be currently active Finishes incremental garbage collection, unless in a critical section Code entering a critical section is expected to check if we need to force a gc completion, and to trigger the gc again if necessary when exiting the critcial section. Returns true if the gc cycle completed, false otherwise.
| void QV4::MemoryManager::updateUnmanagedHeapSizeGCLimit | ( | ) |
|
friend |
| uint QV4::MemoryManager::allocations[BlockAllocator::NumBins] |
| BlockAllocator QV4::MemoryManager::blockAllocator |
| ChunkAllocator* QV4::MemoryManager::chunkAllocator |
| bool QV4::MemoryManager::crossValidateIncrementalGC = false |
| QV4::ExecutionEngine* QV4::MemoryManager::engine |
| std::unique_ptr<GCStateMachine> QV4::MemoryManager::gcStateMachine {nullptr} |
| HugeItemAllocator QV4::MemoryManager::hugeItemAllocator |
| BlockAllocator QV4::MemoryManager::icAllocator |
| PersistentValueStorage* QV4::MemoryManager::m_persistentValues |
| ObjectsForCompilationUnit* QV4::MemoryManager::m_recordedObjects = nullptr |
| PersistentValueStorage* QV4::MemoryManager::m_weakValues |
| struct { ... } QV4::MemoryManager::statistics |
| std::size_t QV4::MemoryManager::usedSlotsAfterLastFullSweep = 0 |
| Heap::MapObject* QV4::MemoryManager::weakMaps = nullptr |
| Heap::SetObject* QV4::MemoryManager::weakSets = nullptr |