Hi, On Wed, 12 Apr 2006 14:36:40 +0530 "kernel learner" <kernellearner@xxxxxxxxx> wrote: > 1. As far as i know VmRSS = (VmSize - swap space being used by the > process) Not, this is not true. If you mmap() a file into your address space, then VmSize is increased by the size of your virtual region. However, VmRSS doesn't change. It will change when you will actually access the data. It's only when you will really access a page that the kernel will allocate physical memory, copy the data from the file into the page, and map it into your address space. > 2. VmRSS is physical memory being used by the system. > Now, in case of shared libraries the space used by library will be > added in VmRSS of all the processes which are loading it or only to > one process. Actually, I don't know exactly how VmRSS is computed. However, you can read the kernel code to check this out. > 4. Can you tell me any fuction in C which returns the info as shown in > /proc/$PID/status file? open() + read() the /proc file. Sincerly, Thomas -- PETAZZONI Thomas - thomas.petazzoni@xxxxxxxx http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@xxxxxxxxx http://{agenda,livret}dulibre.org - http://www.toulibre.org Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7
Attachment:
signature.asc
Description: PGP signature