aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory/qv4mm_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-01-03 12:06:25 +0100
committerLars Knoll <lars.knoll@qt.io>2017-01-25 08:30:51 +0000
commit8acf7385f341752984db280773f167e405b8bc12 (patch)
treeeb77c00e2c429ec9774509b3e5ef798fec5d1e31 /src/qml/memory/qv4mm_p.h
parent49f43a9f889a0697efb4a90bbce2ccaa44532c92 (diff)
Get rid of MemoryManager::Data
Inline the few remaining members into the MemoryManager class itself. Change-Id: If5fef74581daa89df3e8cc237329c27395ce2289 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/memory/qv4mm_p.h')
-rw-r--r--src/qml/memory/qv4mm_p.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index b6259092e1..9cb71e70de 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -198,9 +198,6 @@ class Q_QML_EXPORT MemoryManager
Q_DISABLE_COPY(MemoryManager);
public:
- struct Data;
-
-public:
MemoryManager(ExecutionEngine *engine);
~MemoryManager();
@@ -427,7 +424,9 @@ public:
size_t getAllocatedMem() const;
size_t getLargeItemsMem() const;
- void changeUnmanagedHeapSizeUsage(qptrdiff delta); // called when a JS object grows itself. Specifically: Heap::String::append
+ // called when a JS object grows itself. Specifically: Heap::String::append
+ void changeUnmanagedHeapSizeUsage(qptrdiff delta) { unmanagedHeapSize += delta; }
+
protected:
/// expects size to be aligned
@@ -450,10 +449,16 @@ public:
StackAllocator<Heap::CallContext> stackAllocator;
BlockAllocator blockAllocator;
HugeItemAllocator hugeItemAllocator;
- QScopedPointer<Data> m_d;
PersistentValueStorage *m_persistentValues;
PersistentValueStorage *m_weakValues;
QVector<Value *> m_pendingFreedObjectWrapperValue;
+
+ std::size_t unmanagedHeapSize = 0; // the amount of bytes of heap that is not managed by the memory manager, but which is held onto by managed items.
+ std::size_t unmanagedHeapSizeGCLimit;
+
+ bool gcBlocked = false;
+ bool aggressiveGC = false;
+ bool gcStats = false;
};
}