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...
a+
cedric,
-------------------------
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...