Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
What memory consumption diagnostic are available in Qt 5 ?
Mearb last edited by
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
If you know exact location in Qt's source where all
allocations go through, that would be really great also.