Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Memory analyzer

    General and Desktop
    3
    3
    1575
    Loading More Posts
    • 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.
    • D
      dolevo last edited by

      Hi all,

      What memory analyzer do you suggest me to analyze my application on Windows? Is there any free one?

      1 Reply Last reply Reply Quote 0
      • B
        bhamuryen last edited by

        Hi,
        you can use
        @#include <windows.h>
        #include <iostream>
        #include <cstdlib>
        #include <stdio.h>
        #include <iomanip>
        #include <sstream>
        #include <string>
        #include <stdlib.h>
        #include <math.h>@
        @
        std::ostringstream stremString;
        std::string resultString;
        DWORDLONG physMemUsed;
        MEMORYSTATUSEX statusExe;
        statusExe.dwLength=sizeof(MEMORYSTATUSEX);
        GlobalMemoryStatusEx(&statusExe);
        physMemUsed = statusExe.ullTotalPhys - statusExe.ullAvailPhys;
        stremString<<" Total Memory " <<(float)(physMemUsed/(1024*1024))<<" Mb ";
        resultString=stremString.str();
        stremString.str("");
        @
        I used it int my a project. This part of the code. You can take something that.

        c++ Software Developer

        1 Reply Last reply Reply Quote 0
        • M
          MuldeR last edited by

          If you are in Visual Studio, then VLD (Visual Leaks Detector) works great:
          http://vld.codeplex.com/

          In contrast to the above code, VLD gives you a call stack for each allocation that caused a memory leak.

          And it's free :-)

          --

          Other than that, I have used BoundsChecker and Insure++ at work. But they are not cheap ;-)

          And on Linux you always have Valgrind...

          My OpenSource software at: http://muldersoft.com/

          Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

          Go visit the coop: http://youtu.be/Jay...

          1 Reply Last reply Reply Quote 0
          • First post
            Last post