aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/memory')
-rw-r--r--src/qml/memory/qv4heap_p.h4
-rw-r--r--src/qml/memory/qv4mm.cpp11
2 files changed, 10 insertions, 5 deletions
diff --git a/src/qml/memory/qv4heap_p.h b/src/qml/memory/qv4heap_p.h
index 07af5a6f7a..d7cfa193e6 100644
--- a/src/qml/memory/qv4heap_p.h
+++ b/src/qml/memory/qv4heap_p.h
@@ -234,7 +234,7 @@ struct QQmlQPointer {
}
T *data() const {
- return d == nullptr || d->strongref.load() == 0 ? nullptr : qObject;
+ return d == nullptr || d->strongref.loadRelaxed() == 0 ? nullptr : qObject;
}
operator T*() const { return data(); }
inline T* operator->() const { return data(); }
@@ -247,7 +247,7 @@ struct QQmlQPointer {
}
bool isNull() const Q_DECL_NOTHROW
{
- return d == nullptr || qObject == nullptr || d->strongref.load() == 0;
+ return d == nullptr || qObject == nullptr || d->strongref.loadRelaxed() == 0;
}
private:
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 9288d3e3b6..6ee36cbfcf 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -112,7 +112,11 @@ enum {
struct MemorySegment {
enum {
+#ifdef Q_OS_RTEMS
+ NumChunks = sizeof(quint64),
+#else
NumChunks = 8*sizeof(quint64),
+#endif
SegmentSize = NumChunks*Chunk::ChunkSize,
};
@@ -219,7 +223,8 @@ Chunk *MemorySegment::allocate(size_t size)
pageReservation.commit(candidate, size);
for (uint i = 0; i < requiredChunks; ++i)
setBit(candidate - base + i);
- DEBUG << "allocated chunk " << candidate << hex << size;
+ DEBUG << "allocated chunk " << candidate << Qt::hex << size;
+
return candidate;
}
}
@@ -847,7 +852,7 @@ MarkStack::MarkStack(ExecutionEngine *engine)
{
base = (Heap::Base **)engine->gcStack->base();
top = base;
- limit = base + ExecutionEngine::GCStackLimit/sizeof(Heap::Base)*3/4;
+ limit = base + engine->maxGCStackSize()/sizeof(Heap::Base)*3/4;
}
void MarkStack::drain()
@@ -1020,7 +1025,7 @@ static size_t dumpBins(BlockAllocator *b, const char *title)
SDUMP() << " large slot map";
HeapItem *h = b->freeBins[BlockAllocator::NumBins - 1];
while (h) {
- SDUMP() << " " << hex << (quintptr(h)/32) << h->freeData.availableSlots;
+ SDUMP() << " " << Qt::hex << (quintptr(h)/32) << h->freeData.availableSlots;
h = h->freeData.next;
}