Lazarus

Programming => General => Topic started by: Robert.Thompson on December 31, 2017, 07:24:04 pm

Title: How to determine maximum memory used by a program?
Post by: Robert.Thompson on December 31, 2017, 07:24:04 pm
Hello:

Is there a way to determine the maximum amount of memory that my program used during its' execution?

Thanks,

Rob.
Title: Re: How to determine maximum memory used by a program?
Post by: marcov on December 31, 2017, 07:39:12 pm
You can get an idea using the values returned by this call:

https://www.freepascal.org/docs-html/rtl/system/getfpcheapstatus.html

The interpretation is a bit difficult though.
Title: Re: How to determine maximum memory used by a program?
Post by: Robert.Thompson on January 01, 2018, 03:48:32 pm
Thank you. :)
Title: Re: How to determine maximum memory used by a program?
Post by: devEric69 on May 16, 2019, 05:09:00 pm
For information, if the cmem unit is somewhere in "uses" ( http://wiki.lazarus.freepascal.org/CMem (http://wiki.lazarus.freepascal.org/CMem) ), then GetFPCHeapStatus returns 0 for all memory quantities (normal behaviour).
TinyPortal © 2005-2018