Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Memory leak in 32 bit but not in 64 bit (linux ubuntu)
Forum Updated to NodeBB v4.3 + New Features

Memory leak in 32 bit but not in 64 bit (linux ubuntu)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k 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.
  • K Offline
    K Offline
    kimf
    wrote on last edited by
    #1

    Hi

    I have made this daemon, listning to the com port and storing data in a mysql database.

    It was developed on my 64 bit ubuntu, copied to and compiled, unmodified, on a 32 bit ubuntu.

    On the 64 bit machine I have had the daemon running for more than 48 hours without any memory leak (according to pmap -d).

    On the 32 bit machine I have detectable memory leak after less than an hour, and it keeps leaking.

    Output from pmap -d just after startup :

    @Address Kbytes Mode Offset Device Mapping
    08048000 124 r-x-- 0000000000000000 0fc:00000 vejrstationd
    08067000 4 r---- 000000000001e000 0fc:00000 vejrstationd
    08068000 4 rw--- 000000000001f000 0fc:00000 vejrstationd
    097f8000 132 rw--- 0000000000000000 000:00000 [ anon ]
    b4400000 132 rw--- 0000000000000000 000:00000 [ anon ]
    b4421000 892 ----- 0000000000000000 000:00000 [ anon ]
    b4517000 4 ----- 0000000000000000 000:00000 [ anon ]
    <truncated>
    bfdf6000 132 rw--- 0000000000000000 000:00000 [ stack ]
    mapped: 52888K writeable/private: 9376K shared: 0K@

    Output from pmap -d after about 5 hours :

    @Address Kbytes Mode Offset Device Mapping
    08048000 124 r-x-- 0000000000000000 0fc:00000 vejrstationd
    08067000 4 r---- 000000000001e000 0fc:00000 vejrstationd
    08068000 4 rw--- 000000000001f000 0fc:00000 vejrstationd
    097f8000 1960 rw--- 0000000000000000 000:00000 [ anon ]
    b4400000 132 rw--- 0000000000000000 000:00000 [ anon ]
    b4421000 892 ----- 0000000000000000 000:00000 [ anon ]
    b4517000 4 ----- 0000000000000000 000:00000 [ anon ]
    <truncated>
    bfdf6000 132 rw--- 0000000000000000 000:00000 [ stack ]
    mapped: 54716K writeable/private: 11204K shared: 0K@

    Please observer the block at 097f8000, this one just keeps growing !

    Any idea why I have this difference between a 32bit and a 64bit machine, and how I find the cause of the leak ?

    To the best of my knowledge Qt, Mysql and Ubuntu is the same, except for the number of bits !

    Kim

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      This sounds rather strange indeed. You should bring this question to the interest mailing list, there you'll find Qt's developers/maintainers (this forum is more user oriented)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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