1
votes

I recently started using FastMM, now I want to know if is it possible to configure FastMM log file to be a bit more readable so that it can give me direction on where exactly the the memory is being leaked, like specifying the actual unit and function/line number, in most cases I would get something like...

A memory block has been leaked. The size is: 20

This block was allocated by thread 0xE7C, and the stack trace (return addresses) at the time was:

    5005995A [System.pas][System][System.@GetMem][4316]
    5005E99F [System.pas][System][System.TObject.NewInstance][15447]
    5005F292 [System.pas][System][System.@ClassCreate][16757]
    23A606 [FireDAC.Stan.Util.pas][FireDAC.Stan.Util][FireDAC.Stan.Util.TFDBuffer.Create][1516]
    4C46D3 [FireDAC.Phys.IBWrapper][Phys.Ibwrapper.TIBDatabase.$bctr$qqrp29Firedac.Phys.Ibwrapper.TIBEnvp14System.TObject]
    4C4730 [FireDAC.Phys.IBWrapper][Phys.Ibwrapper.TIBDatabase.$bctr$qqrp29Firedac.Phys.Ibwrapper.TIBEnvpvp14System.TObject]
    4CEF79 [FireDAC.Phys.IBBase][Phys.Ibbase.TFDPhysIBConnectionBase.InternalConnect$qqrv]
    E4A553 [FireDAC.Phys.pas][FireDAC.Phys][FireDAC.Phys.TFDPhysConnection.ConnectBase][3161]
    E4A60E [FireDAC.Phys.pas][FireDAC.Phys][FireDAC.Phys.TFDPhysConnection.DoConnect][3187]
    E4B11C [FireDAC.Phys.pas][FireDAC.Phys][FireDAC.Phys.TFDPhysConnection.Open][3361]
    34A14C [FireDAC.Comp.Client.pas][FireDAC.Comp.Client][FireDAC.Comp.Client.TFDCustomConnection.DoInternalLogin][3642]

The block is currently used for an object of class: TFDBuffer

Which does not really give me what I need.

It's already telling you that - the unit name is in the first set of [] (left side of each line) and the line number is in the last [] (right side of each line).Ken White
Problem with this is that it does not direct you to your code, I have an application which uses alot of units, so this stack trace is so vague, as this memory leak can be in any unit. I need something more meaningful, currently its very hard to detect in my code.Fero
I want something which is in this question, check where he indicates where the memory leak is, but in his case its a question, now I need to know how he made his FastMM log file to specify the exact location of his memory leak, stackoverflow.com/questions/10071185/…Fero
My reference to madExcept is that fastmm allows stack traces from other tools like madExcept and EurekaLog and JDGB. But I know you can configure the stack trace depth. Why don't you dig around in the options. You are using the full FastMM aren't you?David Heffernan