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 use less RAM for embedded qt application on linux ARM?

How use less RAM for embedded qt application on linux ARM?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 1.9k 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.
  • Q Offline
    Q Offline
    QtFriend
    wrote on last edited by
    #1

    When I start my ARM board, I see Linux and some init programs use around 11MB memory.
    If I then start my (quite large) Qt applictaton (with GUI, network, video,...) , the used RAM rises to 95MB.

    After a while this increases even further to around 120MB, and the device only has 122MB available.
    This is obviously not good, and I want to lower the memory usage.

    How can I use less RAM for embedded qt applications on linux ARM? Or are these large memory requirements normal for Qt?

    PS: I tried using a swap file and then memory + swap usage is relatively steady, so I assume it's not a memory leak.
    (117MB used + 15MB swap)

    raven-worxR 1 Reply Last reply
    0
    • Q QtFriend

      When I start my ARM board, I see Linux and some init programs use around 11MB memory.
      If I then start my (quite large) Qt applictaton (with GUI, network, video,...) , the used RAM rises to 95MB.

      After a while this increases even further to around 120MB, and the device only has 122MB available.
      This is obviously not good, and I want to lower the memory usage.

      How can I use less RAM for embedded qt applications on linux ARM? Or are these large memory requirements normal for Qt?

      PS: I tried using a swap file and then memory + swap usage is relatively steady, so I assume it's not a memory leak.
      (117MB used + 15MB swap)

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @QtFriend
      i guess since you are using some Qt modules your best chance is to recompile Qt and disable certain features you do not need.
      This mainly decreases the size of the shared libraries and thus also the memory consumption.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QtFriend
        wrote on last edited by
        #3

        Thanks raven-worx.

        The used qt shared libraries have the following sizes:
        Core = 2.9MB
        GUI = 8.7MB
        Network = 907kB
        Phonon = 277kB

        If I use all these shared libraries I only get to ~12.8MB. This is very acceptable, and reducing some features will bring this down a little, perhaps to 10MB combined, but not tens of MB. Or am I misunderstanding?

        raven-worxR 1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Hi! These libraries themselves pull in other libraries from your system.

          1 Reply Last reply
          0
          • Q QtFriend

            Thanks raven-worx.

            The used qt shared libraries have the following sizes:
            Core = 2.9MB
            GUI = 8.7MB
            Network = 907kB
            Phonon = 277kB

            If I use all these shared libraries I only get to ~12.8MB. This is very acceptable, and reducing some features will bring this down a little, perhaps to 10MB combined, but not tens of MB. Or am I misunderstanding?

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @QtFriend
            not only file size will decrease but also the memory allocation by objects.
            But of course you also need to inspect your source code for memory efficiency.
            Using pointers and references as much as possible, object reusage, etc

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0

            • Login

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