diff options
author | Lars Knoll <[email protected]> | 2014-03-25 10:08:01 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-03-27 23:27:02 +0100 |
commit | 37fbfa4dc0de361eb05bc34077bdb8eab1113aad (patch) | |
tree | 9dd5f1912758183aeb5360f54a52658a7e9b64bd /src/qml/jsruntime | |
parent | cfd5a1fb4ed1c51c3dadab0c63820c625992069d (diff) |
Be a bit more conservative with allocating memory
Cap the max chunk size at 2MB. This value still still doesn't
affect the v8 benchmark noticably, but should avoid extreme
memory usage in some corner cases
Task-number: QTBUG-37134
Change-Id: If2050374c4a7df7ff74194d64880e2d660ea26fd
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4mm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp index 249ec9589e..8a255e1bad 100644 --- a/src/qml/jsruntime/qv4mm.cpp +++ b/src/qml/jsruntime/qv4mm.cpp @@ -125,7 +125,7 @@ struct MemoryManager::Data , engine(0) , totalItems(0) , totalAlloc(0) - , maxShift(10) + , maxShift(6) , largeItems(0) , deletable(0) { @@ -207,7 +207,7 @@ Managed *MemoryManager::alloc(std::size_t size) // no free item available, allocate a new chunk { - // allocate larger chunks at a time to avoid excessive GC, but cap at maximum chunk size (32MB by default) + // allocate larger chunks at a time to avoid excessive GC, but cap at maximum chunk size (2MB by default) uint shift = ++m_d->nChunks[pos]; if (shift > m_d->maxShift) shift = m_d->maxShift; |