diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2024-02-09 21:44:02 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2024-03-05 14:06:29 +0100 |
commit | bb3999a22d3282911005865135c9d6d49ae65728 (patch) | |
tree | 62c9ecc64940b380c2ddd84b02a4a5475281b1d6 /src/qml/memory/qv4mm_p.h | |
parent | d6d224892e6672dc3ed8f027b54277fe8a7971f9 (diff) |
QV4 garbage collection: Allocate white during gc run
Now that we properly employ the WriteBarrier, we no longer need to use
black allocations. This reduces the amount of floating garbage, and
avoids potential bugs with heap classes like QV4::MemberData where we
rely on it being marked so that its constituents don't have to be
protected during initialization – which would fail when we it is already
black, as it wouldn't be pushed on the MarkStack afterwards.
Fixes: QTBUG-121910
Change-Id: Ie5e0f9461fa5c0e4a293da3d3c978da73743e417
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/memory/qv4mm_p.h')
-rw-r--r-- | src/qml/memory/qv4mm_p.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h index 74aa0b639f..a16ea580b1 100644 --- a/src/qml/memory/qv4mm_p.h +++ b/src/qml/memory/qv4mm_p.h @@ -320,12 +320,6 @@ public: typename ManagedType::Data *allocIC() { Heap::Base *b = *allocate(&icAllocator, align(sizeof(typename ManagedType::Data))); - if (m_markStack) { - // If the gc is running right now, it will not have a chance to mark the newly created item - // and may therefore sweep it right away. - // Protect the new object from the current GC run to avoid this. - b->setMarkBit(); - } return static_cast<typename ManagedType::Data *>(b); } |