[lkml]   [1996]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectfunction getrusage(2): kernel/sys.c, problems...


Well, I would know the amount of memory used by my process... So, I'm
looking for a function in the man pages and I found getrusage(2).

This function fills correctly the timing fields (struct timeval
ru_?time), but not the memory fields (long ru_i?rss). They are always set
with zeros!

I take a look in the system code of getrusage(2) found in
"/usr/src/linux/kernel/sys.c" for Linux kernel 2.0 and the fields for memory
usage are forgotten!

I've told about this problem in the french newsgroup fr.comp.os.linux.
Nobody understands this forgetting, it seems to be the same for SunOS!!!

Why? This function is so usefull...


Nom De Code: dricou la fripouille
Mission: infiltrer le milieu universitaire canadien
Accolyte: son amie Carine, dite "la canou"

En cas d'echec, le LaBRI niera toutes implications dans cette operation.
Cette signature s'auto-detruira dans les 5 secondes qui suivent...

 \ /
  Last update: 2005-03-22 13:38    [W:0.020 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site