Tom Verhoeff schreef:
We use the HeapTrc facility in our education to get an impression of
memory management issues in programs submitted for assignments.

Typically our Peach.win.tue.nl system runs programs to test functionality
and robustness (i.e. test for proper precondition checking through Assert)
on small and bigger cases.  Memory management is tested only with one
or two small cases.

I was surprised to find out that the output depends on the platform.
We use FPC 2.2.0 on Linux.

With ppc386 -gl you get something like:

... (line with full path suppressed) ...
Heap dump by heaptrc unit
183 memory blocks allocated : 4419/5400
175 memory blocks freed     : 4355/5336
8 unfreed memory blocks : 64
True heap size : 425984
True free heap : 425344
Should be : 425472
Call trace for block $F7F863C8 size 8
  $08064540  TQUEUEOFINT__PUT,  line 153 of Queue_Pointers.pas
  $08048FCD  TESTPUT,  line 234 of unbounded_queue_pointers.pp
  $080494A5  TESTMULTIPUT,  line 290 of unbounded_queue_pointers.pp
  $0804953C  TESTSAW,  line 314 of unbounded_queue_pointers.pp
  $08049C94  PROCESSINFILE,  line 431 of unbounded_queue_pointers.pp
  $08049FC0  main,  line 459 of unbounded_queue_pointers.pp
  $0807C621
... etc. ...

With ppcx64 -gl (all options equal, also in config files) it produces:


Maybe using dwarf debug info helps? Try ppcx64 -gwl

Vincent

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to