[Lazarus] heap trace
Martin
lazarus at mfriebe.de
Tue Mar 6 15:11:52 CET 2012
On 06/03/2012 13:55, Antonio Fortuny wrote:
> Hi all.
>
> Sorry if this is a silly question but I can't find the answer into
> this forun.
> How to get the function names in the heaptrc trace ?
> I use in project options:
> in Linking options:
> generate debug info for dgb
> show line numbers
> use symbol file for gdb
> use "heaptrc"
that sounds around correct.
Please test those settings on a dummy project
A simple form, in formcreate, create a new object, and never free it
TObject.Create;
Maybe test with explicit "dwarf" or "stabs" ?
Your FPC is "as installed" or self compiled?
>
> in project .pas the very first line is:
> SetHeapTraceOutput(ChangeFileExt(ParamStr(0), '.log'));
>
> File program.log is created ok:
>
> Heap dump by heaptrc unit
> 3564 memory blocks allocated : 1746202/1754304
> 3563 memory blocks freed : 1746174/1754272
> 1 unfreed memory blocks : 28
> True heap size : 425984 (96 used in System startup)
> True free heap : 429024
> Should be : 425792
> Call trace for block $001F14E8 size 28
> /* $0061997C
> $0040D5A4
> $00411EC1
> */How to get details about the source code generating those memory leaks ?
The first line, looks like it may not be in your code.
It may be there is no info for the $0061... address.
the code that generates the dumps, stops adding line info, once it has
failed a single line....
See: http://bugs.freepascal.org/view.php?id=13518
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120306/8c0065c0/attachment-0003.html>
More information about the Lazarus
mailing list