Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting memory usage of a child process

2 views
Skip to first unread message

Hackker Wong

unread,
Oct 20, 2001, 3:03:02 AM10/20/01
to
Hi,

In a C program running in Unix, how does the parent know the amount of
memory used of its child?

I am using fork() and then execlp() to execute a program. And I need to
calculate the maximum memory used of that program.

Thank you very much!

--
- By Hackker
****************************************************
Mr. Hackker Wong,
Y99 Student of Computer Science,
The Chinese University of Hong Kong.
****************************************************
-The World can't run without computer technicians-


Lawrence Kirby

unread,
Oct 20, 2001, 1:42:05 PM10/20/01
to
In article <3BD121A6...@cse.cuhk.edu.hk>
wyw...@cse.cuhk.edu.hk "Hackker Wong" writes:

>Hi,
>
>In a C program running in Unix, how does the parent know the amount of
>memory used of its child?

As far as the C language is concerned there is no way to get such
information. A good place to discuss Unix system features is
comp.unix.programmer.

--
-----------------------------------------
Lawrence Kirby | fr...@genesis.demon.co.uk
Wilts, England | 7073...@compuserve.com
-----------------------------------------

0 new messages