[fpc-pascal] Measure used memory of a process using TProcess.
Michael Van Canneyt
michael at freepascal.org
Wed Apr 22 09:34:09 CEST 2015
On Tue, 21 Apr 2015, Kiên Nguyễn Tiến Trung wrote:
> I want to execute a command using TProcess and get the amount of memory used by the command. Is it possible? I'm finding a solution working on both Linux and Windows.
I have no knowledge of pascal code that accomplishes this.
Under Linux you can probably try to read /proc/$PID/status, the various memory parameters start with 'Vm'
Obviously this only works while the process is running.
Michael.
More information about the fpc-pascal
mailing list