diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-02-15 15:40:27 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:59:23 +0000 |
commit | e772081db104e09e95ed09e8d1f0076e07fc53f6 (patch) | |
tree | 1261b71d754b8de8520335ee545707e6d64b544e /src/qml/memory/qv4mm_p.h | |
parent | 2a554434a571dcefd26cf10ef8c5ae8b3b7d66db (diff) |
Incremental garbage collection
Add an incremental mode to the garbage collector, that will
get used for many collections. This should significantly
reduce average stop times for GC.
Make sure that manual calls to gc() still do a full collection,
to ensure consistency and keep tests that rely on gc() working.
Change-Id: I87b13529377b7639ce993dbd99e85ff0a555acd8
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.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h index 3e542b0aa3..f91175e78a 100644 --- a/src/qml/memory/qv4mm_p.h +++ b/src/qml/memory/qv4mm_p.h @@ -155,6 +155,8 @@ struct BlockAllocator { void sweep(); void freeAll(); + void resetBlackBits(); + void collectGrayItems(ExecutionEngine *engine); // bump allocations HeapItem *nextFree = 0; @@ -176,6 +178,8 @@ struct HugeItemAllocator { HeapItem *allocate(size_t size); void sweep(); void freeAll(); + void resetBlackBits(); + void collectGrayItems(ExecutionEngine *engine); size_t usedMem() const { size_t used = 0; @@ -418,7 +422,7 @@ public: return t->d(); } - void runGC(); + void runGC(bool forceFullCollection = false); void dumpStats() const; @@ -463,6 +467,7 @@ public: bool gcBlocked = false; bool aggressiveGC = false; bool gcStats = false; + bool nextGCIsIncremental = false; }; } |