Re: Mem usage of a process with getrusage

Tigran Aivazian (tigran@sco.COM)
Tue, 7 Jul 1998 09:28:18 +0100 (BST)


Hello,

Some time ago you mailed asking about getrusage(2) not returning some of
the fields of struct rusage. If you read the comment above the getrusage()
function in kernel/sys.c it explains that after the task table becomes
dynamically allocated by means of kmalloc() it will make sense to put
struct rusage into the task_struct itself and then we could simply
use copy_to_user() in the same manner as we do in sys_getrlimit() (see
kernel/sys.c). The rusage is not in task_struct now because that would
make task_struct slightly bigger.

Btw, the reason why getrusage() needs a parameter task_struct *p instead
of getting at "current" internally is because in IRIX port irix_waitsys()
(and possibly others) need to call getrusage() for a process other than
current.

Regards,
------
Tigran A. Aivazian | http://www.sco.com/
Escalations Research Group | Email: tigran@sco.com
Santa Cruz Operation Ltd |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu