by hinoki · 5y ago · 0 comments
So you can have virtual address space “usage”, commit “usage”, and physical page “usage” (which can be shared between processes).
And that’s just anonymous memory, file backed gets even more complicated. Are pages that are in file cache but no longer mapped into a process counted as “usage”?
Anyways, for an introduction to a topic I would expect more links to background information, and you can go very deep trying to answer the question of how much memory an application is using. And the first step is to carefully define “memory” and “using”.
Edit: Actually it looks like the behavior might have changed. hmmm. I guess read the man pages tied to the kernel you're using
Edit 2: Nope, I misread the most recent manpage. I should not read manpages when I'm tired. It does zero fill specifically for anonymous mappings