From 32041ca0b9196a4997ec3c6157e1703e853126c2 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Thu, 14 Dec 2023 22:12:23 +0100 Subject: PersistentValueStorage: remember last free page instead of reshuffling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ulf Hermann Reviewed-by: Qt CI Bot --- src/qml/jsruntime/qv4persistent_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/jsruntime/qv4persistent_p.h') 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); -- cgit v1.2.3