Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.1
-
Windows 7, Mac OS X 10.9
-
dd40295c31cacb2560e5c1ac25e217fd497600a3 ab79e832e602b6366340151720b8c7c7b7ddb1a3
Description
Please run the attached example.
On Windows Task Bar Manager will report (in the Private Working set area) the following memory usages:
1) Immediately after starting the application it will be ~5MB;
2) After pressing the "Show Model Window" button and a QQuickView window opens the memory will get to ~35 MB;
3) Pressing the "Reset Model" button, scrolling the QQuickView window, closing and re-opening it several times in no matter what order will constantly request more and more memory;
4) Closing the QQuickView window will eventually release ~2 MB, but after re-opening it the memory consumption will increase back;
5) Memory consumption eventually stabilizes with a ~5 MB increase on Windows and ~7 MB on Mac OS X from the moment QQuickView window was opened.
6) No memory decrease was noticed after pressing the "Reset Model" button.
7) Doing some debugging with WinDbg I noticed constant calls to VirtualAlloc and no VirtualFree calls for all the above operations, except closing and re-opening the QQuickView window. Tracing the calls to VirtualAlloc/VirtualFree lead me to WTF::OSAllocator::reserveAndCommit / WTF::OSAllocator::releaseDecommitted from Qt5Qml module. When closing the QQuickView window apparently OSAllocator releases the same amount of memory allocated with VirtualAlloc, but figures reported by Task Bar manager might suggest that some memory is kept somewhere else as well and is not released when QQuickView window gets destructed.
This is a highly important issue for our production code, because our application can deal with dozens of such QQuickView windows and more complex UIs inside, which results in memory increases at a way more larger scale than what current demo project exhibits so those 5 MB increase are really important for us to understand where they came and how workaround this. Thank you!
Attachments
Issue Links
- relates to
-
QTBUG-41099 QML should be better at releasing virtual memory to the OS
-
- Open
-