[fpc-pascal](no subject)

Jonas Maebe jonas at zeus.rug.ac.be
Tue Sep 18 17:19:40 CEST 2001

On dinsdag, september 18, 2001, at 01:01 , Mattias Gaertner wrote:

> Question 1:
> 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?

I think that if you recompile the heaptrc unit with -dEXTRA, this will 
happen every time you allocate/release memory.

BTW: I don't know about your second question, but you should 
"quicktrace" to false if you want more thorough debugging


More information about the fpc-pascal mailing list