Graeme Geldenhuys schreef:
The reason why I'm not sure, is because I created a simple console
test application. Initially, running the program, I got the correct
output. Then I thought I would enable 'heaptrc' (-gh compiler
parameter) to make sure I am not leaking memory in the application.
Now with heaptrc enabled, I get some strange output.. :-(

So now I'm confused.


---- with heaptrc enabled------------------------
$ ./project1
t=hello
Text=hello
Text=������������ᆳ
Heap dump by heaptrc unit
20 memory blocks allocated : 608/632
20 memory blocks freed     : 608/632
0 unfreed memory blocks : 0
True heap size : 131072
True free heap : 131072


---- Without heaptrc enabled------------------------
tmp $ ./project1
t=hello
Text=hello
Text=hello world


I'm using FPC 2.3.1 (latest revision) using 64bit Linux.


I guess heaptrc expose that you are looking at memory that is already freed.

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

Reply via email to