Linux – the size of shared memory page

linuxmemory

On Linux, for each process, I can check /proc/PID/statm file.

It's numbers contain values of:

  • Total program size, in kilobytes
  • Size of memory portions, in kilobytes ??????
  • Number of pages that are shared

Which is great, but how do I know how much is a page?

Best Answer

I'm not a Linux god (by any means) but typically page sizes are 4Kb. There's a pagesize command that should tell you what it is set to on your system. This gives the output of the getpagesize() function.