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. What memory consumption diagnostic are available in Qt 5 ?

What memory consumption diagnostic are available in Qt 5 ?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 489 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
    Mearb
    wrote on last edited by
    #1

    Is there a way in Qt to get total memory allocated ?
    In my pure c++ project I used something like this:

    @unsigned int memory_balance = 0;

    void *operator new( unsigned int n )
    {
    void *vp = malloc( n );
    if ( vp != NULL ) memory_balance += _msize( vp );
    }

    void operator delete( void *vp )
    {
    memory_balance -= _msize( vp );
    ::free( vp );
    }@

    But in Qt it seems like it successfully capture new operator
    calls but it does not capture delete operator calls for the same
    memory pointers, which is not what I see in Task Manager
    where it states that memory is released correctly.

    Is there any better way to capture Qt's memory balance ?

    Task Manager and similar tools are not the answer since
    they report whole process balance which is not precise
    enough.

    If you know exact location in Qt's source where all
    allocations go through, that would be really great also.

    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