1

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!

2
  • 2
    No, I don't think so. Per process kernel memory is quite small. Commented Feb 26, 2014 at 5:47
  • 2
    On 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) | sort Commented Feb 26, 2014 at 5:54

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

AFAIK RSS tells how much user space memory given process occupies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.