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 analyzer
QtWS25 Last Chance

Memory analyzer

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.8k Views
  • 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 Offline
    D Offline
    dolevo
    wrote on last edited by
    #1

    Hi all,

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

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bhamuryen
      wrote on last edited by
      #2

      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
      0
      • M Offline
        M Offline
        MuldeR
        wrote on last edited by
        #3

        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
        0

        • Login

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