Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-04

Measure used memory of a process using TProcess.

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Kiên Nguyễn Tiến Trung

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.

Reply by email

Michael Van Canneyt
to Kiên Nguyễn Tiến Trung
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.

Reply by email

Kiên Nguyễn Tiến Trung
to Michael Van Canneyt

Thank you.

2015-04-22 14:34 GMT+07:00 Michael Van Canneyt :

Show quoted text 20 lines
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. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email