3

I am trying to hunt down memory leaks in the GUI which is written in Delphi (not a simple task, seeing as the code is enormous- tens of thousands of lines of code). I've made a file parser which analyzes the report generated by FASTMM, and creates TMemoryLeak instances and stores them in a neat VirtualNodeTree.

The problem, however, is that generating such a report and then parsing through it, takes a lot of time. There is a FMM method called CheckBlocksOnShutDown, which I was able to isolate and call just by a click of a button, but, again, it creates a whole new report, which I have to traverse, and store the whole report in my NodeTree. I would like to achieve a near-real-time view of the new memory leaks being created by repeatedly clicking the

I would like to tweak FASTMM code to make it create memory leak instances "on the go", without writing anything to a file. Is this feasible? (simialar question)

Community
  • 1
  • 1
programstinator
  • 1,354
  • 3
  • 12
  • 31
  • 3
    How do you decide an allocation is a leak and the application is not going to free it after you log it in? – Sertac Akyuz Oct 09 '12 at 11:29
  • 1
    Good question- I may not have been very clear. I DO NOT decide if they are really leaks or not, I just want to count all the LIVE instances (in as much real time as possible) and analyze the numbers of those instances. So, after a few clicks on the refresh button, I will see which class creates too many instances, and I will know which part of the HUGE code to look into. But, I don't want to do all this from the file. – programstinator Oct 09 '12 at 11:42
  • 1
    So far as I recall, FastMM already has a tool that does this. The memory usage tool. I think. I'm sure I've mentioned this at least once in one of your recent questions. – David Heffernan Oct 09 '12 at 11:48
  • 2
    You might want to see the source code of [Denomo](http://www.kbasm.com/denomo.html). – Sertac Akyuz Oct 09 '12 at 11:51
  • @DavidHeffernan , you asked me if I was building my app with enough debug info. You haven't mentioned any tool. What is it called? How do I use it? SertacAkyuz, I've checked out Denomo's source code, but I'm still clueless about how to use it. – programstinator Oct 09 '12 at 12:03
  • 1
    No I cannot find such a comment. Perhaps it was to someone else. My memory fails me. Anyway, it's the usage tracker demo. The svn repo is here: https://fastmm.svn.sourceforge.net/svnroot/fastmm/ I suspect that you may be re-inventing the wheel. At the very least surely you can start from the FastMM demo. – David Heffernan Oct 09 '12 at 12:06
  • 1
    @DavidHeffernan I've tried the usage tracker demo, but it doesn't really give me the information I need- the number of instances listed by type. – programstinator Oct 09 '12 at 12:43
  • @Goran_Mandic Did you ever finish your log viewer? Would you mind sharing it if you did? I am looking for an easy way to parse/summarize large fastMM logs. – sse May 25 '15 at 22:54
  • @sse email me at gugl021@gmail.com – programstinator May 26 '15 at 11:40

0 Answers0