Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
How to determine maximum memory used by a program?
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Does Any1 know a Tool to ...
by
JD
[
Today
at 10:36:11 am]
chart in lazreport
by
Al-Eid
[
Today
at 10:33:55 am]
[SOLVED] Formating an int...
by
Zoran
[
Today
at 10:17:14 am]
Problem with scrolling im...
by
ITomi
[
Today
at 10:14:02 am]
Win-10 64-bit, installed ...
by
PascalDragon
[
Today
at 09:22:14 am]
Windows API test programs...
by
PascalDragon
[
Today
at 09:17:49 am]
TFPHTTPServer and absolut...
by
PascalDragon
[
Today
at 09:09:43 am]
Creating descendants of T...
by
egsuh
[
Today
at 09:00:43 am]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 08:46:13 am]
Lazarus Release 2.0.10
by
alaa123456789
[
Today
at 08:09:24 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to determine maximum memory used by a program? (Read 1420 times)
Robert.Thompson
Jr. Member
Posts: 56
"A very bad coder."
How to determine maximum memory used by a program?
«
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.
Logged
Lazarus: 1.8.4 2018-11-17
FPC: 3.0.4 x86_64-linux-gtk2
System: Kernel: 4.15.0-39-generic x86_64 bits: 64 gcc: 7.3.0 Cinnamon 3.8.9 Linux Mint 19 Tara
Phoenix v: 11JB.M044.20100622.hkk date: 06/22/2010
Intel Core i5 M 460 (-MT-MCP-) arch: Nehalem rev.5 cache: 3072 KB
NVIDIA GeForce 310M
marcov
Global Moderator
Hero Member
Posts: 9014
FPC developer.
Re: How to determine maximum memory used by a program?
«
Reply #1 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.
Logged
Robert.Thompson
Jr. Member
Posts: 56
"A very bad coder."
Re: How to determine maximum memory used by a program?
«
Reply #2 on:
January 01, 2018, 03:48:32 pm »
Thank you.
Logged
Lazarus: 1.8.4 2018-11-17
FPC: 3.0.4 x86_64-linux-gtk2
System: Kernel: 4.15.0-39-generic x86_64 bits: 64 gcc: 7.3.0 Cinnamon 3.8.9 Linux Mint 19 Tara
Phoenix v: 11JB.M044.20100622.hkk date: 06/22/2010
Intel Core i5 M 460 (-MT-MCP-) arch: Nehalem rev.5 cache: 3072 KB
NVIDIA GeForce 310M
devEric69
Sr. Member
Posts: 419
Re: How to determine maximum memory used by a program?
«
Reply #3 on:
May 16, 2019, 05:09:00 pm »
For information, if the cmem unit is somewhere in "uses" (
http://wiki.lazarus.freepascal.org/CMem
), then GetFPCHeapStatus returns 0 for all memory quantities (normal behaviour).
«
Last Edit: May 16, 2019, 05:12:34 pm by devEric69
»
Logged
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
How to determine maximum memory used by a program?
TinyPortal
© 2005-2018