aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory/qv4mm_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-03-09 10:36:16 +0100
committerLars Knoll <lars.knoll@qt.io>2017-04-07 06:06:17 +0000
commit589f8a90fa8c158ec97f32d4a9539b47ba8486a2 (patch)
treea379d6cc9d85b6565d712943d0fcf763466403e0 /src/qml/memory/qv4mm_p.h
parent1e63f7c4833c19f760f4af0b7650311819d0f2b2 (diff)
Separate the stack used for GC from the regular JS stack
This is required to be able to implement concurrent or incremental garbage collection. Change-Id: Ib3c5eee3779ca2ee08a57cd3961dbcb0537bbb54 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.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index 7f02a4f929..1335ea59b6 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -156,7 +156,7 @@ struct BlockAllocator {
void sweep();
void freeAll();
void resetBlackBits();
- void collectGrayItems(ExecutionEngine *engine);
+ void collectGrayItems(MarkStack *markStack);
// bump allocations
HeapItem *nextFree = 0;
@@ -179,7 +179,7 @@ struct HugeItemAllocator {
void sweep();
void freeAll();
void resetBlackBits();
- void collectGrayItems(ExecutionEngine *engine);
+ void collectGrayItems(MarkStack *markStack);
size_t usedMem() const {
size_t used = 0;
@@ -432,8 +432,6 @@ public:
// called when a JS object grows itself. Specifically: Heap::String::append
void changeUnmanagedHeapSizeUsage(qptrdiff delta) { unmanagedHeapSize += delta; }
- void drainMarkStack(Value *markBase);
-
protected:
/// expects size to be aligned
@@ -446,10 +444,11 @@ protected:
#endif // DETAILED_MM_STATS
private:
- void collectFromJSStack() const;
+ void collectFromJSStack(MarkStack *markStack) const;
void mark();
void sweep(bool lastSweep = false);
bool shouldRunGC() const;
+ void collectRoots(MarkStack *markStack);
public:
QV4::ExecutionEngine *engine;