[fpc-pascal] Monitoring memory usage

Florian Klaempfl F.Klaempfl at gmx.de
Wed Nov 10 08:46:21 CET 2004

Alan Mead wrote:

> Is there an easy way to monitor memory allocations during a program
> run (for debugging purposes)?

I guess the easiest is using the heaptrc unit and modifying it for your 

> Ideally, this would be some sort of hook into the memory manager
> rather than something like gdb because the program runs for hours.  
> A list of the calling subroutine (or line number) and the amount
> allocated/deallocated, that would be quite helpful.  
> I think I can trace most of the memory being allocated manually but
> I'd like an auditing mechanism to verify.
> Thanks!
> -Alan
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

More information about the fpc-pascal mailing list