Search code examples
linuxmemorypmap

pmap size vs rss when it can't be disk


When I run pmap, I see a lot of segments like:

     Address Perm   Offset Device    Inode       Size    Rss    Pss Referenced Anonymous Swap Locked Mapping
7fdb7c000000 rw-p 00000000  00:00        0        132      4      4          4         4    0      0 

There's 128kB that aren't in RAM (that'd be Rss), aren't in swap (that's zero, plus it's disabled on this machine) and aren't left on disk as a named file (this segment doesn't mmap a file). So what are they?


Solution

  • There's 128kB that aren't in RAM (that'd be Rss), aren't in swap (that's zero, plus it's disabled on this machine) and aren't left on disk as a named file (this segment doesn't mmap a file).

    They aren't on any device, as device number 00:00 tells you. So, for example, they aren't on a raw disk partition, either.

    So what are they?

    They are not mapped to any device and they are not resident in memory, so they can only be purely virtual. They exhibit the kernel having assigned virtual memory to the process that is not (yet) associated with any actual storage. This is a thing that happens.