Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How much heap memory for Symbian C++/QML application
Forum Updated to NodeBB v4.3 + New Features

How much heap memory for Symbian C++/QML application

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MichK
    wrote on 21 Feb 2012, 22:07 last edited by
    #1

    Hi,

    I am developing an application for Symbian devices which uses Qt C++ and QML.
    Recently I found that my app consumes more then 8 MB of heap memory, which causes it to crash.
    I know I can increase memory using EPOCHEAPSIZE, but I wonder whether 8 MB heap usage is OK or too much?

    I tested my app on Nokia C7 with Qt 4.7.3. My app has image provider, few screens and ListView with animated elements.
    I use C++ models to provide data to QML elements which show the data.
    Before calling QDeclarativeView::setSource I can see that heap consume is less then 2MB.
    After calling QDeclarativeView::setSource heap usage is near 6 MB.

    Thanks in advance !

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MichK
      wrote on 24 Feb 2012, 21:00 last edited by
      #2

      During investigations I found some interesting things .

      Every time data() method of my model, derived from QAbstractListModel, is called memory usage increases. (more precisely: every time when I call data method memory consumption is logged and I can see it increases) This happens for every role and each role has its own amount of increased memory

      After searching the forum I found "that":http://developer.qt.nokia.com/videos/watch/creating-performant-qt-quick-apps I can make two improvements.

      First: Image of my list item is loaded from image provider, source property of Image element was constructed from other properties of the list item. Because I formed string from properties in the qml, there were too much bindings in the ListView delegate; I added new role to my model

      Second: Every time I added an item to the model I called beginResetModel and endResetModel; Now I call: begin/end InsertRows.

      This helped but still memory ends at some point. So I didn't hesitate and added to my pro file:
      @
      TARGET.EPOCHEAPSIZE = 0x800000 0x2000000
      @

      1 Reply Last reply
      0

      1/2

      21 Feb 2012, 22:07

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved