diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-12-14 22:12:23 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2024-01-25 18:35:04 +0100 |
commit | 32041ca0b9196a4997ec3c6157e1703e853126c2 (patch) | |
tree | 54e9d91cfa5592e2be74b6b4449b24ca47b23e48 /src/qml/jsruntime/qv4persistent_p.h | |
parent | b132678d090bbd070fc10bcb80246391fc0e4e9e (diff) |
PersistentValueStorage: remember last free page instead of reshuffling
This unifies the operation when the gc is running with the normal mode,
avoiding a potentially costly iteration over all pages for allocations
during an ongoing gc cycle.
Change-Id: I39e8990c303149e3bc458b10522cc1487e62a401
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/jsruntime/qv4persistent_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4persistent_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h index 7e208bd4fd..c24d337b60 100644 --- a/src/qml/jsruntime/qv4persistent_p.h +++ b/src/qml/jsruntime/qv4persistent_p.h @@ -51,10 +51,13 @@ struct Q_QML_EXPORT PersistentValueStorage Iterator begin() { return Iterator(firstPage, 0); } Iterator end() { return Iterator(nullptr, 0); } + void clearFreePageHint(); + static ExecutionEngine *getEngine(const Value *v); ExecutionEngine *engine; void *firstPage; + void *freePageHint = nullptr; private: static void freeUnchecked(Value *v); static void freePage(void *page); |