nc-gaertnma at netcologne.de
Tue Sep 18 13:01:31 CEST 2001
I have a nasty bug: an unknown function is overwriting some memory. The bug appears later in other functions (destroyed heap and objects). For example: the GetMem allocates memory which partly was never freed.
To find the evil function I want to check the complete heap (allocated mem) from time to time to see when the error appears. I think the heaptrc unit can add marks at the head and the tail of each allocated mem and do some little checks every time memory is allocated/freed. But how can I check ALL structures (allocated+freed memory blocks) at once?
writeln('heap tracing ...');
If I set 'KeepReleased:=true' I got a Segmentation fault right before the 'writeln' statement. Why that?
More information about the fpc-pascal