I am writing a simple memory profiler by reading the VmRSS value of /proc/[pid]/status. My question is that does a process' RSS include kernel space memory? Thank you!
-
2No, I don't think so. Per process kernel memory is quite small.Basile Starynkevitch– Basile Starynkevitch2014-02-26 05:47:52 +00:00Commented Feb 26, 2014 at 5:47
-
2On linuxintro.org/wiki/Memory_management I am blogging how I advance understanding Linux memory management. This is because I have not found a comprehensive documentation. Here is how I created a map of my processes' memory: pmap $(ps -A | awk '{print $1}'|grep -v PID) | sortThorsten Staerk– Thorsten Staerk2014-02-26 05:54:36 +00:00Commented Feb 26, 2014 at 5:54
Add a comment
|
2 Answers
No, if you read the code in task_mmu.c you'll see that it's strictly pages allocated to the process. Kernel space memory usage doesn't really have a quantifiable value at process scope. Any memory increase in the kernel after a process starts execution should be negligible though.