Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-03

heaptrc unit output

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alan Krause

I've been using the heaptrc unit in DEBUG versions of my application to detect memory leaks. However, when a memory leak is detected, it does not include any information on the unit, line number, etc - just the hex addresses, like this:

Heap dump by heaptrc unit
15648 memory blocks allocated : 692533/768936
15641 memory blocks freed : 692193/768560
7 unfreed memory blocks : 340
True heap size : 753664
True free heap : 752816
Should be : 752896
Call trace for block $B7A58528 size 100
$B7E1A1C2
$B7F63DFD
$B7EA9F16
$B7E2AD23
$B7E2B030
$0804891B
$B7B03450

I am using fpc 2.2.0, and building the shared library as follows:

fpc -Sd -Cgiro -g -gh -gl -dDEBUG library.pas -Fu../path1 -Fu../path2 -Fu../path3

Am I missing anything, or is this a shared library issue?

Thanks much,
Alan

Jonas Maebe
to Alan Krause
Alan Krause wrote 6 lines
I am using fpc 2.2.0, and building the shared library as follows: fpc -Sd -Cgiro -g -gh -gl -dDEBUG library.pas -Fu../path1 -Fu../path2 -Fu../path3 Am I missing anything, or is this a shared library issue?

It's a shared library issue. It has been fixed for a number of platforms in 2.2.4: http://bugs.freepascal.org/view.php?id=4171 (I don't know about Linux though, but I think so).

Jonas