Re: Re: Regarding /proc/<pid>/status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear shivaligupta 

> VmSize:    27640 kB
> VmRSS:     26328 kB

You mean, the above fields, correct?

That means, the process currently comsume 26328 kB of physical RAM. But, 
the overall VMA size of this process is 27640 kB. the size of the VMA 
!= allocated RAM.

I'll give you simple example. Suppose that a process is doing anynomous 
mapping requesting 16 kB. The kernel simply create new (or possibly 
extend the existing VMA) VMA with size 16 kB, but it doesn't allocate 
any page frame yet.

As soon as this process try to store something inside this area, page 
fault happen. Since this VMA is file backed, the kernel simply assign a 
free page frame (4kB, in x86 using no PAE mode) and modify the 
process's page table entry so that the relevant virtual address points 
to this new page frame. The process then can store any it likes to this 
new page frame.

So, in this case, the current situation (for this new mapping/VMA only)
Virtual Size= 16 kB
resident= 4 kB

I hope I can explain it better this time...

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux